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
open external val closed: Promise<Void>

Functions

Link copied to clipboard
Link copied to clipboard
open external fun cancelAsync(reason: JsError? = definedExternally): Promise<Void>
Link copied to clipboard
inline suspend fun <R : JsAny?> ReadableStreamDefaultReader<R>.read(): ReadableStreamReadResult<R>

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
external fun releaseLock()

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