Adds utility methods to akin to the Body mixin for fully reading the contents of a ReadableStream as either text, a Blob, or a Uint8Array.
This is a first pass at addressing #1019 ....
In this, I add only the text(), bytes(), and blob() methods. text() returns a promise for UTF-8 decoded text, bytes() returns a promise for a Uint8Array, and blob() returns a promise for a Blob. It is modeled heavily on the fetch spec Body mixin definitions with a few tweaks.
Adds utility methods to akin to the Body mixin for fully reading the contents of a ReadableStream as either text, a Blob, or a Uint8Array.
This is a first pass at addressing #1019 ....
In this, I add only the
text()
,bytes()
, andblob()
methods.text()
returns a promise for UTF-8 decoded text,bytes()
returns a promise for aUint8Array
, andblob()
returns a promise for aBlob
. It is modeled heavily on the fetch specBody
mixin definitions with a few tweaks.Refs: https://github.com/whatwg/streams/issues/1019
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff