Request: duplex property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The duplex read-only property of the Request interface returns the duplex mode of the request, which determines whether the browser must send the entire request before processing the response.

Value

A string with the following possible value:

"half"

The browser must send the entire request before processing the response.

Notes

Although duplex can be passed as an option when constructing a Request, it is not currently exposed as a readable property on the resulting Request object in all browsers.

Examples

Checking a request's duplex mode

js
const stream = new ReadableStream({
  /* ... */
});
const request = new Request("/upload", {
  method: "POST",
  body: stream,
  duplex: "half", // Required for streaming requests
});

console.log(request.duplex); // "half"

Specifications

Specification
Fetch
# dom-request-duplex

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
duplex
Experimental
Chrome – Full support
Chrome 131 (Release date: 2024-11-12)
footnote Full support
Edge – Full support
Edge 131 (Release date: 2024-11-14)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1792434
Opera – Full support
Opera 116 (Release date: 2025-01-08)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 245671
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1792434
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 245671
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 245671
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js 18.13 – 18.20 (Release date: 2023-01-06)
footnote Removed in 19 and later
Node.js – Full support
Node.js 19.3 (Release date: 2022-12-14)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Has more compatibility info.

See also