Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand on processResponseEndOfBody values #1360

Merged
merged 2 commits into from
Nov 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7984,9 +7984,21 @@ in a <a for=/>parallel queue</a> if <a for=fetch><i>useParallelQueue</i></a> is
<p>Takes an algorithm that will be passed a <a for=/>response</a> and null, failure, or a
<a>byte sequence</a>. This is useful for standards that wish to operate on the entire
<a for=/>response</a>'s <a for=response>body</a>, of which the result of reading it is supplied as
second argument.
second argument. The second argument's values have the following meaning:

<p>It might be surprising that a <a for=/>network error</a> will have null as second argument.
<dl>
<dt>null
<dd>The <a for=/>response</a>'s <a for=response>body</a> is null, due to the response being a
<a for=/>network error</a> or having a <a>null body status</a>

<dt>failure
<dd>Attempting to <a for=body>fully read</a> the contents of the <a for=/>response</a>'s
<a for=response>body</a> failed, e.g., due to an I/O error

<dt>a <a>byte sequence</a>
<dd><a for=body>Fully reading</a> the contents of the <a for=/>response</a>'s
<a for=response>body</a> succeeded
</dl>

<p class=warning>A standard that uses this argument cannot operate on <a for=/>response</a>'s
<a for=response>body</a> itself as providing this argument will cause it to be read and it can be
Expand Down