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

BodyInit also allows ReadableStream #35949

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions files/en-us/web/api/fetch_api/using_fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ You can supply the body as an instance of any of the following types:
- {{domxref("File")}}
- {{domxref("URLSearchParams")}}
- {{domxref("FormData")}}
- {{domxref("ReadableStream")}}

Note that just like response bodies, request bodies are streams, and making the request reads the stream, so if a request contains a body, you can't make it twice:

Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/api/requestinit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ You can also construct a `Request` with a `RequestInit`, and pass the `Request`
- {{domxref("FormData")}}
- {{jsxref("TypedArray")}}
- {{domxref("URLSearchParams")}}
- {{domxref("ReadableStream")}}

See [Setting a body](/en-US/docs/Web/API/Fetch_API/Using_Fetch#setting_a_body) for more details.

Expand Down