Skip to content

Commit

Permalink
Set body with byte reading support
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Jan 13, 2023
1 parent 4500d3a commit ea9d056
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5923,16 +5923,13 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:

<li><p>Let <var>highWaterMark</var> be a non-negative, non-NaN number, chosen by the user agent.

<li><p>Let <var>sizeAlgorithm</var> be an algorithm that accepts a <a>chunk</a> object and returns
a non-negative, non-NaN, non-infinite number, chosen by the user agent.

<li><p>Let <var>stream</var> be a <a>new</a> {{ReadableStream}}.

<li><p><a for=ReadableStream>Set up</a> <var>stream</var> with
<a for="ReadableStream/set up"><var>pullAlgorithm</var></a> set to <var>pullAlgorithm</var>,
<a for="ReadableStream/set up"><var>cancelAlgorithm</var></a> set to <var>cancelAlgorithm</var>,
<a for="ReadableStream/set up"><var>highWaterMark</var></a> set to <var>highWaterMark</var>, and
<a for="ReadableStream/set up"><var>sizeAlgorithm</var></a> set to <var>sizeAlgorithm</var>.
<li><p>[=ReadableStream/set up with byte reading support|Set up=] <var>stream</var> with byte
reading support with <var>[=ReadableStream/set up/pullAlgorithm=]</var> set to
<var>pullAlgorithm</var>, <var>[=ReadableStream/set up/cancelAlgorithm=]</var> set to
<var>cancelAlgorithm</var>, <var>[=ReadableStream/set up/highWaterMark=]</var> set to
<var>highWaterMark</var>.

<li><p>Set <var>response</var>'s <a for=response>body</a> to a new <a for=/>body</a> whose
<a for=body>stream</a> is <var>stream</var>.
Expand Down Expand Up @@ -6723,7 +6720,8 @@ steps:
running <var>object</var>'s <a for=Blob>get stream</a>.

<li><p>Otherwise, set <var>stream</var> to a <a>new</a> {{ReadableStream}} object, and
<a for=ReadableStream>set up</a> <var>stream</var>.
[=ReadableStream/set up with byte reading support|set up=] <var>stream</var> with byte reading
support.

<li><p><a for=/>Assert</a>: <var>stream</var> is a {{ReadableStream}} object.

Expand Down

0 comments on commit ea9d056

Please sign in to comment.