v151 · javascript · streams
textStream() for Response / Request / Blob
A convenience method equivalent to .body.pipeThrough(new TextDecoderStream()). Returns a ReadableStream<string> so you can consume text incrementally without manually wiring a TextDecoderStream.
concepts
Streaming Text Reader
Create a Blob, call
textStream(), and watch text chunks arrive incrementally in real time. Compare with.text()(all-at-once) side by side.Response Pipeline
Build a
Responsefrom a string, pipe itstextStream()through a transform that uppercases each chunk, and read the result — demonstratingtextStream()composes with standard stream APIs.Feature Detection
Probe whether
textStream()exists on Blob, Response, and Request, with a fallback to manualTextDecoderStreampiping.
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗