← Chrome 151 reference

v151 · fetch · streams

textStream() for response/request/blob

Limited availability

  • Chrome · 151
  • Edge · mirror (BCD)
  • Firefox · not supported (BCD)
  • Safari · not supported (BCD)

Not on the Baseline register (webstatus.dev query returns no entry, checked 2026-07-26). Support rows per BCD; vendor positions in the compatibility section below.

textStream() reads a byte-stream body — a Response, a Request, or a Blob — as a ReadableStream of decoded strings, always UTF-8. It is exactly equivalent to piping the body through a TextDecoderStream yourself, minus the footgun of forgetting to.

at a glance

At a glance
Milestone listingChrome 151 — Enabled by default
Feature detailDesktop 151, Android 151; status text “Proposed” (updated 2026-06-22); ship stage (intent 5) desktop_first 151
SurfaceMethod on the Body mixin (Request, Response) and on Blob
Runtime featureTextStreamMethod — status stable at trunk (crbug.com/514448226)
Standards bodyWHATWG Fetch (Body mixin) and W3C FileAPI (Blob)
ChromeStatus5146752165478400 — textStream() for response/request/blob
Source: chromestatus.com/feature/5146752165478400; Chromium runtime_enabled_features.json5

Member reference

The feature adds exactly one method on three interfaces (the Body mixin covers Request and Response; Blob is defined separately in FileAPI). Each member has a stable detailed reference page covering syntax, inputs, outputs, errors, context, lifecycle, examples, compatibility, and security/privacy:

Source: Fetch Standard — Body mixin; W3C FileAPI — Blob.textStream()

Syntax

Defined on the Body interface mixin in the Fetch Standard, and separately on Blob in FileAPI:

// WHATWG Fetch — Body mixin (normative IDL)
ReadableStream textStream();

// W3C FileAPI — Blob (normative IDL)
ReadableStream textStream();

Chromium's bindings gate both behind the same runtime feature, marked stable:

// third_party/blink/renderer/core/fetch/body.idl
[RuntimeEnabled=TextStreamMethod, CallWith=ScriptState, RaisesException]
ReadableStream textStream();

// third_party/blink/renderer/core/fileapi/blob.idl
[RuntimeEnabled=TextStreamMethod, CallWith=ScriptState, NewObject, RaisesException]
ReadableStream textStream();
Source: Fetch Standard — Body mixin; FileAPI — Blob.textStream(); Chromium body.idl; Chromium blob.idl
Member reference
ParametersNone.
Return valueA ReadableStream whose chunks are strings — the body's bytes decoded as UTF-8.
ExceptionsTypeError if the object is unusable (its body is non-null and already disturbed or locked) — Fetch Standard method steps, mirrored by the RaisesException binding.
Null bodyIf the body is null, returns a new, already-closed empty ReadableStream (no exception).
EncodingAlways UTF-8 — the decoder is set up “regardless of the presence or the value of a Content-Type header and regardless of the presence or the value of a charset parameter” (Fetch). FileAPI notes this differs from readAsText(), which accepts an encoding label — textStream() has no encoding option.
Side effectFor a non-null body, reading begins immediately: bodyUsed becomes true as soon as textStream() is called, and the object becomes single-use. For a null body, bodyUsed stays false and repeated calls each return a new, independently closed empty stream (WPT null-body tests). Blob has no bodyUsed at all — every call returns a fresh stream.
Source: Fetch Standard — textStream() method steps; FileAPI — textStream() method steps; WPT textstream.any.js (bodyUsed and string-chunk contracts)

Examples

Live example from the Chrome Platform Showcase: read a response as a stream of decoded text chunks. Source: chrome-platform-showcase
// Read a fetch() response as a stream of decoded text chunks.
const response = await fetch("/large-log.txt");
const reader = response.textStream().getReader();

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  console.log("chunk:", value); // value is a string, decoded as UTF-8
}

// Same contract on a Blob (e.g. a File from an <input type="file">):
const stream = file.textStream();
// ...and on a Request body before it is sent.
Source: whatwg/fetch PR #1862; WPT textstream.any.js (reader-loop shape)

Browser compatibility

Per browser-compat-data (checked 2026-07-26): the entry exists for all three interfaces — api/Response.json, api/Request.json, and api/Blob.json.

Compatibility — from BCD (checked 2026-07-26)
Engine / runtimeSupportNotes
Chrome151All three interfaces (Response, Request, Blob) per BCD; matches the Chrome 151 milestone listing (Enabled by default); Chrome for Android and WebView (Android + iOS) are BCD mirrors
EdgemirrorBCD mirrors Chrome's data
FirefoxNot supportedBCD version_added: false (Firefox for Android mirrors); vendor signal recorded on the ChromeStatus entry: No signal
SafariNot supportedBCD version_added: false (Safari on iOS mirrors); the ChromeStatus entry records a Positive signal — a recorded signal, not an official WebKit standards position (a feature this small has none)
Node.js26.5.0BCD records version_added: 26.5.0 for all three interfaces
DenoUnknownNo BCD entry as of 2026-07-26

Support rows are from BCD only. Separately, vendor signals come from the ChromeStatus API feature record (checked 2026-07-26): Firefox “No signal”, Safari “Positive”, web developers “No signals”. No Baseline entry: the webstatus.dev query returns no feature (checked 2026-07-26).

Source: BCD api/Response.json; BCD api/Request.json; BCD api/Blob.json; chromestatus.com/feature/5146752165478400

Specifications

Specifications
SpecificationStatus
WHATWG Fetch — Body mixin: textStream()Living Standard (normative); landed via whatwg/fetch PR #1862 (merged)
W3C FileAPI — Blob.textStream()Working Draft (normative)
Source: fetch.spec.whatwg.org; w3c.github.io/FileAPI

See also