TextDecoderStream

A stream transformer that turns incoming bytes into text using a character encoding such as UTF-8, even when a character is split across chunks.

In more detail

It defaults to UTF-8. Pipe a response through it with response.body.pipeThrough(new TextDecoderStream()) to read text chunks directly.

Related terms

Taught in

References