---
title: "ReadableStreamDefaultReader | Grafana k6 documentation"
description: "ReadableStreamDefaultReader represents a default reader that can be used to read stream data."
---

# ReadableStreamDefaultReader

The `ReadableStreamDefaultReader` type represents a default reader that can be used to read stream data. It can be used to read from a [ReadableStream](/docs/k6/next/javascript-api/k6-experimental/streams/readablestream/) object that has an [underlying source](/docs/k6/next/javascript-api/k6-experimental/streams/readablestream/#underlyingsource-optional) of any type.

## Methods

Expand table

| Name                                                                                                           | Description                                                                                                                                                       |
|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [cancel(reason)](/docs/k6/next/javascript-api/k6-experimental/streams/readablestreamdefaultreader/cancel/)     | Returns a `Promise` that resolves when the stream is canceled.                                                                                                    |
| [read()](/docs/k6/next/javascript-api/k6-experimental/streams/readablestreamdefaultreader/read/)               | Returns a `Promise` that resolves with an object containing the `done` and `value` properties, providing access to the next chunk in the stream’s internal queue. |
| [releaseLock()](/docs/k6/next/javascript-api/k6-experimental/streams/readablestreamdefaultreader/releaselock/) | Releases the lock on the stream.                                                                                                                                  |
