Re: [whatwg/fetch] Allow a request body to be a byte sequence/string (#1083)

@yutakahirano requested changes on this pull request.



> @@ -5710,17 +5716,13 @@ typedef (ReadableStream or XMLHttpRequestBodyInit) BodyInit;</pre>
     <p>If <var>object</var>'s {{Blob/type}}
     attribute is not the empty byte sequence, set <var>Content-Type</var> to its value.
 
-    <p>Set <var>source</var> to <var>object</var>.
+   <dt><a for=/>byte sequence</a>
+   <dd><p><a for=ReadableStream>Enqueue bytes</a> given <var>object</var> and <var>stream</var>.

We need to close the stream below.

>  
    <dt><code>BufferSource</code>
-   <dd>
-    <p><a for=ReadableStream>Enqueue</a> a <code>Uint8Array</code> object
-    wrapping an <code>ArrayBuffer</code> containing a copy of the bytes held by <var>object</var>
-    to <var>stream</var> and <a abstract-op>close</a>
-    <var>stream</var>. If that threw an exception,
-    <a abstract-op>error</a> <var>stream</var> with that exception.
-
-    <p>Set <var>source</var> to <var>object</var>.
+   <dd><p><a for=ReadableStream>Enqueue bytes</a> given a
+   <a lt="get a copy of the buffer source">copy of the bytes</a> held by <var>object</var> and
+   <var>stream</var>.

ditto

-- 
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/1083#pullrequestreview-475386026

Received on Wednesday, 26 August 2020 11:13:57 UTC