Skip to main content
Skip to main content

ReadableStream

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.

MDN Reference

Type parameters

RobjectRequired

Properties

lockedbooleanRequired

Methods

cancel

MDN Reference

Parameters

reasonany

Returns

PromisePromise<void>Required

getReader

**getReader**(options): [ReadableStreamBYOBReader](/references/js-client/modules/internal#readablestreambyobreader)

MDN Reference

Parameters

optionsobjectRequired
options.mode"byob"Required

Returns

ReadableStreamBYOBReader(stream: ReadableStream<any>) => ReadableStreamBYOBReaderRequired

**getReader**(): [ReadableStreamDefaultReader](/references/js-client/modules/internal#readablestreamdefaultreader)&#60;R&#62;

Returns

ReadableStreamDefaultReaderReadableStreamDefaultReader<R>Required

**getReader**(options?): [ReadableStreamReader](/references/js-client/internal/types/internal.ReadableStreamReader)&#60;R&#62;

Parameters

Returns

ReadableStreamReaderReadableStreamReader<R>Required

pipeThrough

MDN Reference

Parameters

transformReadableWritablePair<T, R>Required

Returns

ReadableStreamReadableStream<T>Required

pipeTo

MDN Reference

Parameters

destinationWritableStream<R>Required

Returns

PromisePromise<void>Required

tee

MDN Reference

Returns

[ReadableStream&#60;R&#62;, ReadableStream&#60;R&#62;][ReadableStream<R>, ReadableStream<R>]Required
Was this section helpful?