ReadableStream

open external class ReadableStream<R>(underlyingSource: UnderlyingDefaultSource<R>, strategy: QueuingStrategy<R> = definedExternally) : Transferable(source)

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

Constructors

Link copied to clipboard
constructor(underlyingSource: UnderlyingSource<R> = definedExternally, strategy: QueuingStrategy<R> = definedExternally)
constructor(underlyingSource: UnderlyingDefaultSource<R>, strategy: QueuingStrategy<R> = definedExternally)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun cancel(reason: JsError? = definedExternally)
Link copied to clipboard
fun cancelAsync(reason: JsError? = definedExternally): Promise<Void>
Link copied to clipboard
fun <T> pipeThrough(transform: ReadableWritablePair<T, R>, options: StreamPipeOptions = definedExternally): ReadableStream<T>
Link copied to clipboard
suspend fun pipeTo(destination: WritableStream<R>, options: StreamPipeOptions = definedExternally)
Link copied to clipboard
fun pipeToAsync(destination: WritableStream<R>, options: StreamPipeOptions = definedExternally): Promise<Void>
Link copied to clipboard