[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/zh-CN/docs/Web/API/TextEncoderStream/TextEncoderStream [Back]  [Original]

TextEncoderStream() - Web API | MDN

MDN Web Docs

View in English Always switch to English

TextEncoderStream()

20229

TextEncoderStream() TextEncoderStream UTF-8

js
new TextEncoderStream()

TextEncoderStream

js
const body = textStream.pipeThrough(new TextEncoderStream());
fetch("/dest", {
  method: "POST",
  body,
  headers: { "Content-Type": "text/plain; charset=UTF-8" },
});

Encoding
# ref-for-dom-textencoderstream


Web Proxy Viewer  |  New URL  |  Original Page