Re: [whatwg/fetch] Uploading a Request made from a ReadableStream body (#425)

annevk requested changes on this pull request.

Generally this looks okay, but I'm a little concerned that the first step of https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch is not modified. It seems this should directly affect that, no?

> @@ -589,6 +589,9 @@ user-agent-defined <a for=header>value</a> for the
 
  <li><p>A <dfn export for=body id=concept-body-total-bytes>total bytes</dfn> (an
  integer), initially 0.
+
+ <li><p>A <dfn export for=body id=concept-body-replayable>replayable flag</dfn> (a boolean),
+ initially false.

I know this is annoying, and at some point we're going to burn all the flags, but for now we should keep consistency and only set and unset flags and don't say they're booleans.

> @@ -3025,6 +3028,11 @@ in addition to <a>HTTP fetch</a> above.
  <a lt="include credential">includes credentials</a>, then return a
  <a>network error</a>.
 
+ <li><p>If <var>request</var>'s <a for=request>method</a> is not <code>303</code>,

I think you mean to check response's status here, no?

> @@ -589,6 +589,9 @@ user-agent-defined <a for=header>value</a> for the
 
  <li><p>A <dfn export for=body id=concept-body-total-bytes>total bytes</dfn> (an
  integer), initially 0.
+
+ <li><p>A <dfn export for=body id=concept-body-replayable>replayable flag</dfn> (a boolean),
+ initially false.

Also, I think we want to call this cloneable maybe? That is what the operation we want to fail is called.

> @@ -4240,9 +4252,7 @@ method, when invoked, must run these steps:
 <h3 id=body-mixin>Body mixin</h3>
 
 <pre class=idl>
-typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
-
-typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
+typedef (Blob or BufferSource or FormData or URLSearchParams or USVString or ReadableStream) BodyInit;</pre>

I think we should continue to put USVString last.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/425#pullrequestreview-10283523

Received on Monday, 28 November 2016 10:05:11 UTC