← Back to release summary

textStream() for response/request/blob

Category
DOM
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Add textStream() to interfaces that represent a byte stream (request, response, blob). This is equivalent to piping the byte stream through a TextDecoderStream(), and reduces this small piece of broilerplate for commoncases.

Motivation

A small ergonomic change to make it easier to stream text from a byte stream such as response (or blob) to a sink that accepts strings. Helps with a footgun of forgetting to pipe through a TextDecoderStream.

Standards & signals

Explainers: https://github.com/whatwg/fetch/pull/1862

View on chromestatus.com