ReadableStreamDefaultReader
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2628
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).
Type Parameters
Section titled “Type Parameters”R = any
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ReadableStreamDefaultReader<
R>(stream):ReadableStreamDefaultReader<R>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2629
Parameters
Section titled “Parameters”stream
Section titled “stream”Returns
Section titled “Returns”ReadableStreamDefaultReader<R>
Properties
Section titled “Properties”closed
Section titled “closed”
readonlyclosed:Promise<void>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2630
Methods
Section titled “Methods”cancel()
Section titled “cancel()”cancel(
reason?):Promise<void>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2631
Parameters
Section titled “Parameters”reason?
Section titled “reason?”any
Returns
Section titled “Returns”Promise<void>
read()
Section titled “read()”read():
Promise<ReadableStreamReadResult<R>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2637
The read() method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream’s internal queue.
Returns
Section titled “Returns”Promise<ReadableStreamReadResult<R>>
releaseLock()
Section titled “releaseLock()”releaseLock():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2643
The releaseLock() method of the ReadableStreamDefaultReader interface releases the reader’s lock on the stream.
Returns
Section titled “Returns”void