diff --git a/files/en-us/web/api/fetch/index.md b/files/en-us/web/api/fetch/index.md index a65030cff161963..6192bd627a25651 100644 --- a/files/en-us/web/api/fetch/index.md +++ b/files/en-us/web/api/fetch/index.md @@ -38,106 +38,7 @@ fetch(resource, options) - `options` {{optional_inline}} - - : An object containing any custom settings you want to apply to the request. - The possible options are: - - - `attributionReporting` {{experimental_inline}} - - - : Indicates that you want the request's response to be able to register a JavaScript-based [attribution source](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_sources#javascript-based_event_sources) or [attribution trigger](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_triggers#javascript-based_attribution_triggers). `attributionReporting` is an object containing the following properties: - - - `eventSourceEligible` - - : A boolean. If set to `true`, the request's response is eligible to register an attribution source. If set to `false`, it isn't. - - `triggerEligible` - - : A boolean. If set to `true`, the request's response is eligible to register an attribution trigger. If set to `false`, it isn't. - - > **Note:** See the [Attribution Reporting API](/en-US/docs/Web/API/Attribution_Reporting_API) for more details. - - - `body` - - - : Any body that you want to add to your request: - this can be a {{domxref("Blob")}}, an {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, - a {{domxref("FormData")}}, a {{domxref("URLSearchParams")}}, string object or literal, - or a {{domxref("ReadableStream")}} object. This latest possibility is still experimental; check the [compatibility information](/en-US/docs/Web/API/Request#browser_compatibility) to verify you can use it. - Note that a request using the `GET` or `HEAD` method cannot have a body. - - - `browsingTopics` {{experimental_inline}} - - - : A boolean specifying that the selected topics for the current user should be sent in a {{httpheader("Sec-Browsing-Topics")}} header with the associated request. See [Using the Topics API](/en-US/docs/Web/API/Topics_API/Using) for more details. - - - `cache` - - - : A string indicating how the request will interact with the browser's [HTTP cache](/en-US/docs/Web/HTTP/Caching). The possible values, `default`, `no-store`, `reload`, `no-cache`, `force-cache`, and `only-if-cached`, are documented in the article for the {{domxref("Request/cache", "cache")}} property of the {{domxref("Request")}} object. - - - `credentials` - - - : Controls what browsers do with credentials ([cookies](/en-US/docs/Web/HTTP/Cookies), [HTTP authentication](/en-US/docs/Web/HTTP/Authentication) entries, and TLS client certificates). Must be one of the following strings: - - - `omit`: Tells browsers to exclude credentials from the request, and ignore any credentials sent back in the response (e.g., any {{HTTPHeader("Set-Cookie")}} header). - - `same-origin`: Tells browsers to include credentials with requests to same-origin URLs, and use any credentials sent back in responses from same-origin URLs. **This is the default value.** - - `include`: Tells browsers to include credentials in both same- and cross-origin requests, and always use any credentials sent back in responses. - - > **Note:** Credentials may be included in simple and "final" cross-origin requests, but should not be included in [CORS preflight requests](/en-US/docs/Web/HTTP/CORS#preflight_requests_and_credentials). - - - `headers` - - - : Any headers you want to add to your request, contained within a {{domxref("Headers")}} object or an object literal with {{jsxref("String")}} values. - Note that [some names are forbidden](/en-US/docs/Glossary/Forbidden_header_name). - - > **Note:** The [`Authorization`](/en-US/docs/Web/HTTP/Headers/Authorization) HTTP header may be added to a request, but will be removed if the request is redirected cross-origin. - - - `integrity` - - - : Contains the [subresource integrity](/en-US/docs/Web/Security/Subresource_Integrity) - value of the request (e.g., `sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=`). - - - `keepalive` - - : The `keepalive` option can be used to allow the request to outlive the page. - Fetch with the `keepalive` flag is a replacement for the {{domxref("Navigator.sendBeacon()")}} API. - - `method` - - - : The request method, e.g., `"GET"`, `"POST"`. - The default is `"GET"`. - Note that the {{httpheader("Origin")}} header is not set on Fetch requests with a method of {{HTTPMethod("HEAD")}} or {{HTTPMethod("GET")}}. - Any string which is a case-insensitive match for one of the methods in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#name-overview) will be uppercased automatically. - If you want to use a custom method (like `PATCH`), you should uppercase it yourself. - - - `mode` - - : The mode you want to use for the request, e.g., `cors`, - `no-cors`, or `same-origin`. - - `priority` - - : Specifies the priority of the fetch request relative to other requests of the same type. Must be one of the following strings: - - `high` - - : A high priority fetch request relative to other requests of the same type. - - `low` - - : A low priority fetch request relative to other requests of the same type. - - `auto` - - : Automatically determine the priority of the fetch request relative to other requests of the same type (default). - - `redirect` - - - : How to handle a `redirect` response: - - - `follow` - - : Automatically follow redirects. Unless otherwise stated the redirect mode is set to `follow`. - - `error` - - : Abort with an error if a redirect occurs. - - `manual` - - : Caller intends to process the response in another context. - See [WHATWG fetch standard](https://fetch.spec.whatwg.org/#concept-request-redirect-mode) for more information. - - - `referrer` - - - : A string specifying the referrer of the request. This can be a - same-origin URL, `about:client`, or an empty string. - - - `referrerPolicy` - - : Specifies the [referrer policy](https://w3c.github.io/webappsec-referrer-policy/#referrer-policies) to use for the request. May be one of `no-referrer`, - `no-referrer-when-downgrade`, `same-origin`, - `origin`, `strict-origin`, - `origin-when-cross-origin`, - `strict-origin-when-cross-origin`, or `unsafe-url`. - - `signal` - - : An {{domxref("AbortSignal")}} object instance; allows you to communicate with a - fetch request and abort it if desired via an {{domxref("AbortController")}}. + - : A {{domxref("RequestInit")}} object containing any custom settings that you want to apply to the request. ### Return value diff --git a/files/en-us/web/api/request/credentials/index.md b/files/en-us/web/api/request/credentials/index.md index 2aba409dc600513..46e5c486f06049a 100644 --- a/files/en-us/web/api/request/credentials/index.md +++ b/files/en-us/web/api/request/credentials/index.md @@ -8,28 +8,30 @@ browser-compat: api.Request.credentials {{APIRef("Fetch API")}} -The **`credentials`** read-only property of the {{domxref("Request")}} interface indicates whether the user agent should send or receive cookies from the other domain in the case of cross-origin requests. +The **`credentials`** read-only property of the {{domxref("Request")}} interface reflects the value given to the {{domxref("Request.Request()", "Request()")}} constructor in the [`credentials`](/en-US/docs/Web/API/RequestInit#credentials) option, and determines whether or not the browser sends credentials with the request. + +Credentials are cookies, {{glossary("TLS")}} client certificates, or authentication headers containing a username and password. + +See [Including credentials](/en-US/docs/Web/API/Fetch_API/Using_Fetch#including_credentials) for more details. ## Value -A `RequestCredentials` dictionary value indicating whether the user agent should send or receive cookies from the other domain in the case of cross-origin requests. Possible values are: +A string with one of the following values: - `omit` - - : Never send or receive cookies. + - : Never send credentials in the request or include credentials in the response. - `same-origin` - - : Send user credentials (cookies, basic http auth, etc..) if the URL is on the same origin as the calling script. **This is the default value.** + - : Only send and include credentials for same-origin requests. - `include` - - : Always send user credentials (cookies, basic http auth, etc..), even for cross-origin calls. - -This is similar to XHR's [`withCredentials`](/en-US/docs/Web/API/XMLHttpRequest/withCredentials) flag, but with three available values instead of two. + - : Always include credentials, even for cross-origin requests. ## Examples In the following snippet, we create a new request using the {{domxref("Request.Request", "Request()")}} constructor (for an image file in the same directory as the script), then save the request credentials in a variable: ```js -const myRequest = new Request("flowers.jpg"); -const myCred = myRequest.credentials; // returns "same-origin" by default +const request = new Request("flowers.jpg"); +const request = request.request; // returns "same-origin" by default ``` ## Specifications diff --git a/files/en-us/web/api/request/request/index.md b/files/en-us/web/api/request/request/index.md index f4c2b5f2972a508..0206d4dfe10d555 100644 --- a/files/en-us/web/api/request/request/index.md +++ b/files/en-us/web/api/request/request/index.md @@ -36,65 +36,7 @@ new Request(input, options) - `options` {{optional_inline}} - - : An object containing any custom settings that you want to apply to the - request. The possible options are: - - - `attributionReporting` {{experimental_inline}} - - - : Indicates that you want the request's response to be able to register a JavaScript-based [attribution source](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_sources#javascript-based_event_sources) or [attribution trigger](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_triggers#javascript-based_attribution_triggers). `attributionReporting` is an object containing the following properties: - - - `eventSourceEligible` - - : A boolean. If set to `true`, the request's response is eligible to register an attribution source. If set to `false`, it isn't. - - `triggerEligible` - - : A boolean. If set to `true`, the request's response is eligible to register an attribution trigger. If set to `false`, it isn't. - - > **Note:** See the [Attribution Reporting API](/en-US/docs/Web/API/Attribution_Reporting_API) for more details. - - - `body` - - : Any body that you want to add to your request: this can be a - {{domxref("Blob")}}, an {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, - a {{domxref("FormData")}}, a {{domxref("URLSearchParams")}}, a string, or a {{domxref("ReadableStream")}} object. - Note that a request using the `GET` or `HEAD` method cannot have a body. - - `browsingTopics` {{experimental_inline}} - - : A boolean specifying that the selected topics for the current user should be sent in a {{httpheader("Sec-Browsing-Topics")}} header with the associated request. See [Using the Topics API](/en-US/docs/Web/API/Topics_API/Using) for more details. - - `cache` - - : The [cache mode](/en-US/docs/Web/API/Request/cache) you want to use for the request. - - `credentials` - - : The request credentials you want to use for the - request: `omit`, `same-origin`, or `include`. The - default is `same-origin`. - - `headers` - - : Any headers you want to add to your request, contained - within a {{domxref("Headers")}} object or an object literal with - {{jsxref("String")}} values. - - `integrity` - - : Contains the [subresource integrity](/en-US/docs/Web/Security/Subresource_Integrity) - value of the request (e.g., - `sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=`). - - `keepalive` - - : A boolean that indicates whether to make a persistent connection for multiple requests/responses. - - `method` - - : The request method, e.g., `GET`, `POST`. The default is `GET`. - - `mode` - - : The mode you want to use for the request, e.g., - `cors`, `no-cors`, `same-origin`, or - `navigate`. The default is `cors`. - - `priority` - - : Specifies the priority of the fetch request relative to other requests of the same type. Must be one of the following strings: - - `high`: A high priority fetch request relative to other requests of the same type. - - `low`: A low priority fetch request relative to other requests of the same type. - - `auto`: Automatically determine the priority of the fetch request relative to other requests of the same type (default). - - `redirect` - - : The redirect mode to use: `follow`, - `error`, or `manual`. The default is `follow`. - - `referrer` - - : A string specifying - `no-referrer`, `client`, or a URL. The default is - `about:client`. - - `referrerPolicy` - - : A string that changes how the referrer header is populated during certain actions (e.g., fetching subresources, prefetching, performing navigations). - - `signal` - - : An [AbortSignal](/en-US/docs/Web/API/AbortSignal) object which can be used to communicate with/abort a request. + - : A {{domxref("RequestInit")}} object containing any custom settings that you want to apply to the request. If you construct a new `Request` from an existing `Request`, any options you set in an _options_ argument for the new request replace any corresponding options set in the original `Request`. For example: diff --git a/files/en-us/web/api/requestinit/index.md b/files/en-us/web/api/requestinit/index.md new file mode 100644 index 000000000000000..5fbddcb75295745 --- /dev/null +++ b/files/en-us/web/api/requestinit/index.md @@ -0,0 +1,288 @@ +--- +title: RequestInit +slug: Web/API/RequestInit +page-type: web-api-interface +browser-compat: api.RequestInit +spec-urls: https://fetch.spec.whatwg.org/#requestinit +--- + +{{APIRef("Fetch API")}} + +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 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. + +## Instance properties + +- `attributionReporting` {{optional_inline}} {{experimental_inline}} + + - : Indicates that you want the request's response to be able to register a JavaScript-based [attribution source](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_sources#javascript-based_event_sources) or [attribution trigger](/en-US/docs/Web/API/Attribution_Reporting_API/Registering_triggers#javascript-based_attribution_triggers). `attributionReporting` is an object containing the following properties: + + - `eventSourceEligible` + - : A boolean. If set to `true`, the request's response is eligible to register an attribution source. If set to `false`, it isn't. + - `triggerEligible` + - : A boolean. If set to `true`, the request's response is eligible to register an attribution trigger. If set to `false`, it isn't. + + See the [Attribution Reporting API](/en-US/docs/Web/API/Attribution_Reporting_API) for more details. + +- `body` {{optional_inline}} + + - : The request body contains content to send to the server, for example in a {{httpmethod("POST")}} or {{httpmethod("PUT")}} request. It is specified as an instance of any of the following types: + + - a string + - {{jsxref("ArrayBuffer")}} + - {{domxref("Blob")}} + - {{jsxref("DataView")}} + - {{domxref("File")}} + - {{domxref("FormData")}} + - {{jsxref("TypedArray")}} + - {{domxref("URLSearchParams")}} + + See [Setting a body](/en-US/docs/Web/API/Fetch_API/Using_Fetch#setting_a_body) for more details. + +- `browsingTopics` {{optional_inline}} {{experimental_inline}} + + - : A boolean specifying that the selected topics for the current user should be sent in a {{httpheader("Sec-Browsing-Topics")}} header with the associated request. + + See [Using the Topics API](/en-US/docs/Web/API/Topics_API/Using) for more details. + +- `cache` {{optional_inline}} + + - : The [cache mode](/en-US/docs/Web/API/Request/cache) you want to use for the request. This may be any one of the following values: + + - `default` + + - : The browser looks in its HTTP cache for a response matching the request. + + - If there is a match and it is [fresh](/en-US/docs/Web/HTTP/Caching#fresh_and_stale_based_on_age), it will be returned from the cache. + - If there is a match but it is [stale](/en-US/docs/Web/HTTP/Caching#fresh_and_stale_based_on_age), the browser will make a [conditional request](/en-US/docs/Web/HTTP/Conditional_requests) to the remote server. If the server indicates that the resource has not changed, it will be returned from the cache. Otherwise the resource will be downloaded from the server and the cache will be updated. + - If there is no match, the browser will make a normal request, and will update the cache with the downloaded resource. + + - `no-store` + - : The browser fetches the resource from the remote server without first looking in the cache, _and will not_ update the cache with the downloaded resource. + - `reload` + - : The browser fetches the resource from the remote server without first looking in the cache, _but then will_ update the cache with the downloaded resource. + - `no-cache` + + - : The browser looks in its HTTP cache for a response matching the request. + + - If there is a match, _fresh or stale,_ the browser will make a [conditional request](/en-US/docs/Web/HTTP/Conditional_requests) to the remote server. If the server indicates that the resource has not changed, it will be returned from the cache. Otherwise the resource will be downloaded from the server and the cache will be updated. + - If there is no match, the browser will make a normal request, and will update the cache with the downloaded resource. + + - `force-cache` + + - : The browser looks in its HTTP cache for a response matching the request. + + - If there is a match, _fresh or stale_, it will be returned from the cache. + - If there is no match, the browser will make a normal request, and will update the cache with the downloaded resource. + + - `only-if-cached` + + - : The browser looks in its HTTP cache for a response matching the request. {{experimental_inline}} + + - If there is a match, _fresh or stale_, it will be returned from the cache. + - If there is no match, a network error is returned. + + The `"only-if-cached"` mode can only be used if the request's [`mode`](/en-US/docs/Web/API/Request/mode) is `"same-origin"`. Cached redirects will be followed if the request's `redirect` property is `"follow"` and the redirects do not violate the `"same-origin"` mode. + +- `credentials` {{optional_inline}} + + - : Controls whether or not the browser sends credentials with the request. Credentials are cookies, {{glossary("TLS")}} client certificates, or authentication headers containing a username and password. This option may be any one of the following values: + + - `omit` + - : Never send credentials in the request or include credentials in the response. + - `same-origin` + - : Only send and include credentials for same-origin requests. + - `include` + - : Always include credentials, even for cross-origin requests. + + Including credentials in cross-origin requests can make a site vulnerable to {{glossary("CSRF")}} attacks, so even if `credentials` is set to `include`, the server must also agree to their inclusion by including the {{httpheader("Access-Control-Allow-Credentials")}} in its response. Additionally, in this situation the server must explicitly specify the client's origin in the {{httpheader("Access-Control-Allow-Origin")}} response header (that is, `*` is not allowed). + + See [Including credentials](/en-US/docs/Web/API/Fetch_API/Using_Fetch#including_credentials) for more details. + + Defaults to `same-origin`. + +- `headers` {{optional_inline}} + + - : Any headers you want to add to your request, contained + within a {{domxref("Headers")}} object or an object literal whose keys are the names of headers and whose values are the header values. + + Many headers are set automatically by the browser and can't be set by a script: these are called {{glossary("Forbidden header name", "Forbidden header names")}}. + + If the `mode` option is set to `no-cors`, you can only set {{glossary("CORS-safelisted request header", "CORS-safelisted request headers")}}. + + See [Setting headers](/en-US/docs/Web/API/Fetch_API/Using_Fetch#setting_headers) for more details. + +- `integrity` + + - : Contains the [subresource integrity](/en-US/docs/Web/Security/Subresource_Integrity) + value of the request. + + This will be checked when the resource is fetched, just as it would be when the [`integrity`](/en-US/docs/Web/HTML/Element/script#integrity) attribute is set on a {{htmlelement("script")}} element. The browser will compute the {{glossary("Cryptographic_hash_function", "hash")}} of the fetched resource using the specified algorithm, and if the result does not match the value specified, the browser will reject the fetch request with a network error. + + The format of this option is `-` where: + + - `` is one of the following values:`sha256`, `sha384`, or `sha512` + - `` is the {{glossary("base64", "Base64-encoding")}} of the result of hashing the resource with the specified hash algorithm. + + Defaults to an empty string. + +- `keepalive` {{optional_inline}} + + - : A boolean. If `true`, the browser will not abort the request if the page that made it is unloaded before the request is complete. This enables a Fetch request to function as an alternative to {{domxref("Navigator.sendBeacon()")}} when sending analytics at the end of a session. + + The body size for keepalive requests is limited to 64 kibibytes. + + Defaults to `false`. + +- `method` {{optional_inline}} + + - : The [request method](/en-US/docs/Web/HTTP/Methods). + + Defaults to {{httpmethod("GET")}}. + +- `mode` {{optional_inline}} + + - : One of the following values: + + - `same-origin` + - : Disallows cross-origin requests completely. + - `cors` + - : If the request is cross-origin then it will use the [Cross-Origin Resource Sharing (CORS)](/en-US/docs/Web/HTTP/CORS) mechanism. + - `no-cors` + - : The request must be a [simple request](/en-US/docs/Web/HTTP/CORS#simple_requests), which restricts the headers that may be set to {{glossary("CORS-safelisted request header", "CORS-safelisted request headers")}}, and restricts methods to `GET`, `HEAD`, and `POST`. + - `navigate` + - : Used only by HTML navigation. A `navigate` request is created only while navigating between documents. + - `websocket` + - : Used only when establishing a [WebSocket](/en-US/docs/Web/API/WebSockets_API) connection. + + See [Making cross-origin requests](/en-US/docs/Web/API/Fetch_API/Using_Fetch#making_cross-origin_requests) for more details. + + Defaults to `cors`. + +- `priority` {{optional_inline}} + + - : Specifies the priority of the fetch request relative to other requests of the same type. Must be one of the following: + + - `high` + - : A high priority fetch request relative to other requests of the same type. + - `low` + - : A low priority fetch request relative to other requests of the same type. + - `auto` + - : Automatically determine the priority of the fetch request relative to other requests of the same type . + + Defaults to `auto`. + +- `redirect` {{optional_inline}} + + - : Determines the browser's behavior in case the server replies with a [redirect status](/en-US/docs/Web/HTTP/Status#redirection_messages). One of the following values: + + - `follow` + - : Automatically follow redirects. + - `error` + - : Reject the promise with a network error when a redirect status is returned. + - `manual` + - : Return a response with almost all fields filtered out, to enable a service worker to store the response and later replay it. + + Defaults to `follow`. + +- `referrer` {{optional_inline}} + + - : A string specifying the value to use for the request's {{httpheader("Referer")}} header. One of the following: + + - A same-origin relative or absolute URL + - : Set the `Referer` header to the given value. Relative URLs are resolved relative to the URL of the page that made the request. + - An empty string + - : Omit the `Referer` header. + - `about:client` + - : Set the `Referer` header to the default value for the context of the request (for example, the URL of the page that made the request). + + Defaults to `about:client`. + +- `referrerPolicy` {{optional_inline}} + - : A string that sets a policy for the {{httpheader("Referer")}} header. The syntax and semantics of this option are exactly the same as for the {{httpheader("Referrer-Policy")}} header. +- `signal` {{optional_inline}} + - : An {{domxref("AbortSignal")}}. If this option is set, the request can be canceled by calling {{domxref("AbortController.abort()", "abort()")}} on the corresponding `AbortController`. + +## Examples + +### Passing options into `fetch()` + +In this example we pass the `method`, `body`, and `headers` options directly into the [`fetch()`](/en-US/docs/Web/API/fetch) method call: + +```js +async function post() { + const response = await fetch("https://example.org/post", { + method: "POST", + body: JSON.stringify({ username: "example" }), + headers: { + "Content-Type": "application/json", + }, + }); + + console.log(response.status); +} +``` + +### Passing options into the `Request()` constructor + +In this example we create a {{domxref("Request")}}, passing the same set of options into its constructor, and then pass the request into `fetch()`: + +```js +async function post() { + const request = new Request("https://example.org/post", { + method: "POST", + body: JSON.stringify({ username: "example" }), + headers: { + "Content-Type": "application/json", + }, + }); + + const response = await fetch(request); + + console.log(response.status); +} +``` + +### Passing options into both `Request()` and `fetch()` + +In this example we create a {{domxref("Request")}}, passing the `method`, `headers`, and `body` options into its constructor. We then pass the request into `fetch()` along with `body` and `referrer` options: + +```js +async function post() { + const request = new Request("https://example.org/post", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ username: "example1" }), + }); + + const response = await fetch(request, { + body: JSON.stringify({ username: "example2" }), + referrer: "", + }); + + console.log(response.status); +} +``` + +In this case the request will be sent with the following options: + +- `method: "POST"` +- `headers: {"Content-Type": "application/json"}` +- `body: '{"username":"example2"}'` +- `referrer: ""` + +## Specifications + +{{Specifications}} + +## See also + +- [Using Fetch](/en-US/docs/Web/API/Fetch_API/Using_Fetch) +- [ServiceWorker API](/en-US/docs/Web/API/Service_Worker_API) +- [HTTP access control (CORS)](/en-US/docs/Web/HTTP/CORS) +- [HTTP](/en-US/docs/Web/HTTP) diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 4b7f98efa9b0b17..f43b052e5040e13 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -520,7 +520,7 @@ "/docs/Web/API/Fetch_API/Using_Fetch", "/docs/Web/API/Fetch_API/Cross-global_fetch_usage" ], - "interfaces": ["Headers", "Request", "Response"], + "interfaces": ["Headers", "Request", "RequestInit", "Response"], "methods": ["fetch()"], "properties": [], "events": []