Re: [fetch] Introduce Response.body. (#118) (#128)

> +
> + <li><p>If <var>stream</var> is null, set <var>stream</var> to an
> + <span title=concept-empty-ReadableStream>empty ReadableStream</span>.
> +
> + <li><p>Let <var>reader</var> be the result of <span title=concept-get-reader>getting</span>
> + a reader from <var>stream</var>. If that threw an exception, return a new promise rejected
> + with that exception.
> +
> + <li><p>Let <var>promise</var> be the result of
> + <span title=concept-read-all-bytes-from-ReadableStream>reading</span> all bytes from
> + <var>stream</var> with <var>reader</var>.
> +
> + <li><p>Return the result of transforming <var>promise</var> by a fulfillment handler that
> + returns the result of the <span title=concept-body-package-data>package data</span> algorithm
> + with its first argument, <var>type</var> and <span title=concept-body-mime-type>MIME type</span>.
> +</ol>

http://www.w3.org/2001/tag/doc/promises-guide#shorthand-reacting

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/128/files#r40532379

Received on Monday, 28 September 2015 09:24:08 UTC