Skip to content

Commit

Permalink
Add duplex property to Request
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Sep 26, 2022
1 parent 2d080d7 commit 1fbc40c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6793,6 +6793,7 @@ interface Request {
readonly attribute boolean isReloadNavigation;
readonly attribute boolean isHistoryNavigation;
readonly attribute AbortSignal signal;
readonly attribute RequestDuplex duplex;

[NewObject] Request clone();
};
Expand Down Expand Up @@ -6983,6 +6984,14 @@ object), initially null.
{{AbortSignal}} object indicating whether or not <var>request</var> has been aborted, and its abort
event handler.

<dt><code><var>request</var> . <a attribute for=Request>duplex</a></code>
<dd>Returns "<code>half</code>", meaning the fetch will be half-duplex (i.e., the user agent sends
the entire request before processing the response). In future, it could also return
"<code>full</code>", meaning the fetch will be full-duplex (i.e., the user agent can process the
response before sending the entire request) to indicate that the fetch will be full-duplex.
<span class=note>See <a href="https://github.com/whatwg/fetch/issues/1254">issue #1254</a> for
defining "<code>full</code>".</span>

<dt><code><var>request</var> . <a method for=Request>clone</a>()</code>
<dd><p>Returns a clone of <var>request</var>.
</dl>
Expand Down Expand Up @@ -7433,6 +7442,9 @@ set; otherwise false.
<p>The <dfn attribute for=Request><code>signal</code></dfn> getter steps are to return <a>this</a>'s
<a for="Request">signal</a>.

<p>The <dfn attribute for=Request><code>duplex</code></dfn> getter steps are to return
"<code>half</code>".

<hr>

<p>The <dfn method for=Request><code>clone()</code></dfn> method steps are:
Expand Down

0 comments on commit 1fbc40c

Please sign in to comment.