Lines Matching refs:stream
58 const { Readable, pipeline } = require('stream')
61 const { TransformStream } = require('stream/web')
341 if (request.body != null && isReadable(request.body?.stream)) {
342 request.body.stream.cancel(error).catch((err) => {
361 if (response.body != null && isReadable(response.body?.stream)) {
362 response.body.stream.cancel(error).catch((err) => {
439 assert(!request.body || request.body.stream)
974 response.body = { stream: response.body.stream.pipeThrough(transformStream) }
1745 for await (const bytes of request.body.stream) {
1800 // 15. Let stream be a new ReadableStream.
1801 // 16. Set up stream with pullAlgorithm set to pullAlgorithm,
1805 ReadableStream = require('stream/web').ReadableStream
1808 const stream = new ReadableStream(
1830 // 1. Set response’s body to a new body whose stream is stream.
1831 response.body = { stream }
1883 // body is done normally and stream is readable, then close
1884 // stream, finalize response for fetchParams and response, and
1903 // into stream.
1906 // 8. If stream is errored, then terminate the ongoing fetch.
1907 if (isErrored(stream)) {
1912 // 9. If stream doesn’t need more data ask the user agent to suspend
1927 // 2. If stream is readable, then error stream with the result of
1931 if (isReadable(stream)) {
1937 // 3. Otherwise, if stream is readable, error stream with a TypeError.
1938 if (isReadable(stream)) {
1963 body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body,