Skip to content

Commit

Permalink
Add {{AvailableInWorkers}} to fetch API (#36138)
Browse files Browse the repository at this point in the history
add {{AvailableInWorkers}}
  • Loading branch information
skyclouds2001 authored Oct 8, 2024
1 parent 24bd423 commit 121546e
Show file tree
Hide file tree
Showing 47 changed files with 48 additions and 54 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/fetch_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Find out more about using the Fetch API features in [Using Fetch](/en-US/docs/We

## Fetch Interfaces

- {{domxref("Window/fetch", "fetch()")}}
- {{domxref("Window.fetch()")}} and {{domxref("WorkerGlobalScope.fetch()")}}
- : The `fetch()` method used to fetch a resource.
- {{DOMxRef("Headers")}}
- : Represents response/request headers, allowing you to query them and take different actions depending on the results.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/arraybuffer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.arrayBuffer
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`arrayBuffer()`** method of the {{domxref("Request")}} interface
reads the request body and returns it as a promise that resolves with an {{jsxref("ArrayBuffer")}}.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/blob/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.blob
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`blob()`** method of the {{domxref("Request")}} interface
reads the request body and returns it as a promise that resolves with a {{domxref("Blob")}}.
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/request/body/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ page-type: web-api-instance-property
browser-compat: api.Request.body
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The read-only **`body`** property of the {{domxref("Request")}}
The **`body`** read-only property of the {{domxref("Request")}}
interface contains a {{domxref("ReadableStream")}} with the body contents
that have been added to the request. Note that a request using the
`GET` or `HEAD` method cannot have a body
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/request/bodyused/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ page-type: web-api-instance-property
browser-compat: api.Request.bodyUsed
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The read-only **`bodyUsed`** property of the
The **`bodyUsed`** read-only property of the
{{domxref("Request")}} interface is a boolean value that indicates
whether the request body has been read yet.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/bytes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.bytes
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`bytes()`** method of the {{domxref("Request")}} interface reads the request body and returns it as a promise that resolves with an {{jsxref("Uint8Array")}}.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/cache/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.cache
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`cache`** read-only property of the {{domxref("Request")}} interface contains the cache mode of the request. It controls how the request will interact with the browser's [HTTP cache](/en-US/docs/Web/HTTP/Caching).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/clone/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.clone
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`clone()`** method of the {{domxref("Request")}} interface creates a copy of the current `Request` object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.credentials
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

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. It determines whether or not the browser sends credentials with the request, as well as whether any **`Set-Cookie`** response headers are respected.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/destination/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.destination
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`destination`** read-only
property of the **{{domxref("Request")}}** interface returns a string
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/formdata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.formData
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`formData()`** method of the {{domxref("Request")}} interface
reads the request body and returns it as a promise that resolves with a {{domxref("FormData")}} object.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/headers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.headers
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`headers`** read-only property of the
{{domxref("Request")}} interface contains the {{domxref("Headers")}} object associated
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.Request
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`Request`** interface of the [Fetch API](/en-US/docs/Web/API/Fetch_API) represents a resource request.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/integrity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.integrity
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`integrity`** read-only property of the {{domxref("Request")}} interface contains the [subresource integrity](/en-US/docs/Web/Security/Subresource_Integrity) value of the request.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.json
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`json()`** method of the {{domxref("Request")}} interface
reads the request body and returns it as a promise that resolves with the result of parsing the body text as {{JSxRef("JSON")}}.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/method/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.method
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`method`** read-only property of the
{{domxref("Request")}} interface contains the request's method (`GET`,
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/mode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.mode
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`mode`** read-only property of the {{domxref("Request")}}
interface contains the mode of the request (e.g., `cors`,
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/redirect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.redirect
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`redirect`** read-only property of the {{domxref("Request")}} interface contains the mode for how redirects are handled.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/referrer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.referrer
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`referrer`** read-only property of the
{{domxref("Request")}} interface is set by the user agent to be the referrer of the
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/referrerpolicy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.referrerPolicy
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`referrerPolicy`** read-only property of the
{{domxref("Request")}} interface returns the referrer policy, which governs what
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/request/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-constructor
browser-compat: api.Request.Request
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`Request()`** constructor creates a new
{{domxref("Request")}} object.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/signal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.signal
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The read-only **`signal`** property of the {{DOMxRef("Request")}} interface returns the {{domxref("AbortSignal")}} associated with the request.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/text/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Request.text
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`text()`** method of the {{domxref("Request")}} interface
reads the request body and returns it as a promise that resolves with a {{jsxref("String")}}.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Request.url
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`url`** read-only property of the {{domxref("Request")}}
interface contains the URL of the request.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/arraybuffer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.arrayBuffer
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`arrayBuffer()`** method of the {{domxref("Response")}} interface
takes a {{domxref("Response")}} stream and reads it to completion. It returns a promise
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/blob/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.blob
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`blob()`** method of the {{domxref("Response")}} interface takes
a {{domxref("Response")}} stream and reads it to completion. It returns a promise that
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/body/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.body
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`body`** read-only property of the {{domxref("Response")}} interface is a {{domxref("ReadableStream")}} of the body contents.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/bodyused/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.bodyUsed
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`bodyUsed`** read-only property of the {{domxref("Response")}} interface is a boolean value that indicates whether the body has been read yet.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/bytes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.bytes
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`bytes()`** method of the {{domxref("Response")}} interface takes a {{domxref("Response")}} stream and reads it to completion.
It returns a promise that resolves with a {{jsxref("Uint8Array")}}.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/clone/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.clone
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`clone()`** method of the {{domxref("Response")}} interface creates a clone of a response object, identical in every way, but stored in a different variable.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/error_static/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-static-method
browser-compat: api.Response.error_static
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`error()`** static method of the {{domxref("Response")}} interface returns a new `Response` object associated with a network error.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/formdata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.formData
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`formData()`** method of the {{domxref("Response")}} interface
takes a {{domxref("Response")}} stream and reads it to completion. It returns a promise
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/headers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.headers
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`headers`** read-only property of the
{{domxref("Response")}} interface contains the {{domxref("Headers")}} object associated
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.Response
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`Response`** interface of the [Fetch API](/en-US/docs/Web/API/Fetch_API) represents the response to a request.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.json
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`json()`** method of the {{DOMxRef("Response")}} interface takes
a {{DOMxRef("Response")}} stream and reads it to completion. It returns a promise which
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/json_static/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-static-method
browser-compat: api.Response.json_static
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`json()`** static method of the {{domxref("Response")}} interface returns a `Response` that contains the provided JSON data as body, and a {{HTTPHeader("Content-Type")}} header which is set to `application/json`.
The response status, status message, and additional headers can also be set.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/ok/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.ok
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`ok`** read-only property of the {{domxref("Response")}} interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/redirect_static/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-static-method
browser-compat: api.Response.redirect_static
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`redirect()`** static method of the {{domxref("Response")}} interface returns a `Response` resulting in a redirect to the specified URL.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/response/redirected/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ page-type: web-api-instance-property
browser-compat: api.Response.redirected
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The read-only **`redirected`** property of the {{domxref("Response")}} interface indicates whether or not the response is the result of a request you made which was redirected.
The **`redirected`** read-only property of the {{domxref("Response")}} interface indicates whether or not the response is the result of a request you made which was redirected.

> [!NOTE]
> Relying on redirected to filter out redirects makes it easy for a forged redirect to prevent your content from working as expected.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/response/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-constructor
browser-compat: api.Response.Response
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`Response()`** constructor creates a new {{domxref("Response")}} object.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/status/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.status
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`status`** read-only property of the {{domxref("Response")}} interface contains the [HTTP status codes](/en-US/docs/Web/HTTP/Status) of the response.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/statustext/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.Response.statusText
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`statusText`** read-only property of the {{domxref("Response")}} interface contains the status message corresponding to the HTTP status code in {{domxref("Response.status")}}.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/response/text/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.Response.text
---

{{APIRef("Fetch API")}}
{{APIRef("Fetch API")}}{{AvailableInWorkers}}

The **`text()`** method of the {{domxref("Response")}} interface takes a {{domxref("Response")}} stream and reads it to completion.
It returns a promise that resolves with a {{jsxref("String")}}.
Expand Down
Loading

0 comments on commit 121546e

Please sign in to comment.