- From: Yutaka Hirano <notifications@github.com>
- Date: Mon, 05 Oct 2015 04:57:48 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/128/r41135406@github.com>
> +<code title=concept-ReadableStream>ReadableStream</code> with given a byte stream > +<var>bstream</var>, run these steps: > + > +<ol> > + <li><p>Let <var>strategy</var> be an object. The user agent may choose any object. > + > + <li> > + <p>Let <var>pull</var> be an action that runs these substeps: > + > + <ol> > + <li><p>Let <var>bytes</var> be a byte sequence which is > + <span data-anolis-spec=encoding title=concept-stream-read>read</span> from <var>bstream</var>. > + > + <li><p>If <span data-anolis-spec=encoding title=concept-stream-read>read</span> returns > + <span data-anolis-spec=encoding>end-of-stream</span>, > + <span title=concept-close-ReadableStream>close</span> <var>stream</var> defined below. I will use ReadableStream instead of byte stream in request and response. For extracting Strings, ArrayBuffers and FormData objects, they can be converted to byte sequences and thus easily enqueued to a ReadableStream object. For extracting Blobs, it would be possible to define an operation returning a ReadableStream object consisting of the blob contents (At least, as [blob] (https://w3c.github.io/FileAPI/#blob) refers to a byte sequence, enqueuing it to the ReadableStream object is possible. Allowing the UA to split the sequence to chunks would be beneficial, though). --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/128/files#r41135406
Received on Monday, 5 October 2015 11:58:17 UTC