Request
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1658
This Fetch API interface represents a resource request.
Extends
Section titled “Extends”Body
Type Parameters
Section titled “Type Parameters”CfHostMetadata
Section titled “CfHostMetadata”CfHostMetadata
= unknown
Cf
= CfProperties
<CfHostMetadata
>
Properties
Section titled “Properties”
readonly
body:null
|ReadableStream
<any
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1588
Inherited from
Section titled “Inherited from”Body.body
bodyUsed
Section titled “bodyUsed”
readonly
bodyUsed:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1590
Inherited from
Section titled “Inherited from”Body.bodyUsed
readonly
optional
cf:Cf
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1707
fetcher
Section titled “fetcher”
readonly
fetcher:null
| {connect
:Socket
;fetch
:Promise
<Response
>; }
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1700
headers
Section titled “headers”
readonly
headers:Headers
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1693
Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the “Host” header.
integrity
Section titled “integrity”
readonly
integrity:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1713
Returns request’s subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
keepalive
Section titled “keepalive”
readonly
keepalive:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1719
Returns a boolean indicating whether or not request can outlive the global in which it was created.
method
Section titled “method”
readonly
method:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1681
Returns request’s HTTP method, which is “GET” by default.
redirect
Section titled “redirect”
readonly
redirect:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1699
Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
signal
Section titled “signal”
readonly
signal:AbortSignal
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1706
Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
readonly
url:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1687
Returns the URL of request as a string.
Methods
Section titled “Methods”arrayBuffer()
Section titled “arrayBuffer()”arrayBuffer():
Promise
<ArrayBuffer
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1592
Returns
Section titled “Returns”Promise
<ArrayBuffer
>
Inherited from
Section titled “Inherited from”Body.arrayBuffer
blob()
Section titled “blob()”blob():
Promise
<Blob
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1602
Returns
Section titled “Returns”Promise
<Blob
>
Inherited from
Section titled “Inherited from”Body.blob
bytes()
Section titled “bytes()”bytes():
Promise
<Uint8Array
<ArrayBufferLike
>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1594
Returns
Section titled “Returns”Promise
<Uint8Array
<ArrayBufferLike
>>
Inherited from
Section titled “Inherited from”Body.bytes
clone()
Section titled “clone()”clone():
Request
<CfHostMetadata
,Cf
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1675
Returns
Section titled “Returns”Request
<CfHostMetadata
, Cf
>
formData()
Section titled “formData()”formData():
Promise
<FormData
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1600
Returns
Section titled “Returns”Promise
<FormData
>
Inherited from
Section titled “Inherited from”Body.formData
json()
Section titled “json()”json<
T
>():Promise
<T
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1598
Type Parameters
Section titled “Type Parameters”T
Returns
Section titled “Returns”Promise
<T
>
Inherited from
Section titled “Inherited from”Body.json
text()
Section titled “text()”text():
Promise
<string
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250725.0/node_modules/@cloudflare/workers-types/index.ts:1596
Returns
Section titled “Returns”Promise
<string
>
Inherited from
Section titled “Inherited from”Body.text