ReadableStreamDefaultReader

The ReadableStreamDefaultReader interface of the Streams API represents a default reader that can be used to read stream data supplied from a network (such as a fetch request).

MDN Reference

Constructors

Link copied to clipboard
constructor(stream: ReadableStream<R>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun cancel(reason: JsError? = definedExternally)
Link copied to clipboard
open fun cancelAsync(reason: JsError? = definedExternally): Promise<Void>
Link copied to clipboard

The read() method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.

Link copied to clipboard

The read() method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.

Link copied to clipboard

The releaseLock() method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.