Skip to content

docs: Add missing duplex property to RequestInit and update fetch() #40099

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Shrinivassab
Copy link
Contributor

Description

  • Adds missing duplex property to RequestInit (alphabetically between credentials and headers).
  • Documents TypeError behavior in fetch() exceptions table when:
    • body is a ReadableStream but duplex is omitted/not "half".
    • Invalid duplex values are provided.

Motivation

Additional details

Related issues and pull requests

Fixes #40086

@Shrinivassab Shrinivassab requested a review from a team as a code owner June 27, 2025 02:04
@Shrinivassab Shrinivassab requested review from sideshowbarker and removed request for a team June 27, 2025 02:04
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 27, 2025
Copy link
Contributor

github-actions bot commented Jun 27, 2025

Preview URLs

Flaws (1)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Request/duplex
Title: Request: duplex property
Flaw count: 1

  • macros:
    • Can't resolve /en-US/docs/Web/API/RequestInit/duplex

(comment last updated: 2025-06-28 01:48:25)

@Josh-Cena Josh-Cena requested review from wbamberg and removed request for sideshowbarker June 27, 2025 04:35
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Shrinivassab ! I realised we also need a page for the corresponding duplex property of Request. You could model this on, for example, https://developer.mozilla.org/en-US/docs/Web/API/Request/redirect.

@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Jun 28, 2025
@Shrinivassab
Copy link
Contributor Author

Hi @wbamberg I have incorporated your PR comments and in addition to that i added new page for duplex: Please go over it and share your review comments. I will update it based on your suggestions.

localhost_5042-Request duplex property - Web APIs  MDN-fpscreenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RequestInit.duplex is not documented
2 participants