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

Document request options in one place #34437

Merged
merged 11 commits into from
Jul 2, 2024
Prev Previous commit
Next Next commit
Update files/en-us/web/api/requestinit/index.md
  • Loading branch information
wbamberg committed Jun 26, 2024
commit 80908bdea219ac3d97ec06c1a9268361f6e6c1c9
2 changes: 1 addition & 1 deletion files/en-us/web/api/requestinit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec-urls: https://fetch.spec.whatwg.org/#requestinit

The **`RequestInit`** dictionary of the [Fetch API](/en-US/docs/Web/API/Fetch_API) represents the set of options that can be used to configure a Fetch request.

You can pass an instance of `RequestInit` into the {{domxref("Request.Request()", "Request()")}} constructor, or directly into the [`fetch()`](/en-US/docs/Web/API/fetch) function call.
You can pass a `RequestInit` object into the {{domxref("Request.Request()", "Request()")}} constructor, or directly into the [`fetch()`](/en-US/docs/Web/API/fetch) function call.

You can also construct a `Request` with a `RequestInit`, and pass the `Request` to a `fetch()` call along with another `RequestInit`. If you do this, and the same option is set in both places, then the value passed directly into `fetch()` is used.

Expand Down