Skip to main content
ReadableStream - Streams - Web documentation
interface ReadableStream
Private

This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.

Type Parameters

R = any

Properties

readonly
locked: boolean

Methods

cancel(reason?: any): Promise<void>
getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader
pipeTo(
destination: WritableStream<R>,
): Promise<void>
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>
[[Symbol.asyncIterator]](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>