ReadableStreamBYOBRequest
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2689
The ReadableStreamBYOBRequest interface of the Streams API represents a ‘pull request’ for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream’s internal queues).
Accessors
Section titled “Accessors”atLeast
Section titled “atLeast”Get Signature
Section titled “Get Signature”get atLeast():
null|number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2708
Returns
Section titled “Returns”null | number
Get Signature
Section titled “Get Signature”get view():
null|Uint8Array<ArrayBufferLike>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2695
The view getter property of the ReadableStreamBYOBRequest interface returns the current view.
Returns
Section titled “Returns”null | Uint8Array<ArrayBufferLike>
Methods
Section titled “Methods”respond()
Section titled “respond()”respond(
bytesWritten):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2701
The respond() method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.
Parameters
Section titled “Parameters”bytesWritten
Section titled “bytesWritten”number
Returns
Section titled “Returns”void
respondWithNewView()
Section titled “respondWithNewView()”respondWithNewView(
view):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2707
The respondWithNewView() method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.
Parameters
Section titled “Parameters”ArrayBuffer | ArrayBufferView<ArrayBufferLike>
Returns
Section titled “Returns”void