Headers
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1557
This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Headers(
init?
):Headers
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1558
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Headers
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
IterableIterator
<[string
,string
]>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1580
Returns
Section titled “Returns”IterableIterator
<[string
, string
]>
append()
Section titled “append()”append(
name
,value
):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1567
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
delete()
Section titled “delete()”delete(
name
):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1569
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
entries()
Section titled “entries()”entries():
IterableIterator
<[string
,string
]>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1575
Returns
Section titled “Returns”IterableIterator
<[string
, string
]>
forEach()
Section titled “forEach()”forEach<
This
>(callback
,thisArg?
):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1570
Type Parameters
Section titled “Type Parameters”This
= unknown
Parameters
Section titled “Parameters”callback
Section titled “callback”(this
, value
, key
, parent
) => void
thisArg?
Section titled “thisArg?”This
Returns
Section titled “Returns”void
get(
name
):null
|string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1560
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”null
| string
getAll()
Section titled “getAll()”getAll(
name
):string
[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1561
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
[]
has(
name
):boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1563
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
keys()
Section titled “keys()”keys():
IterableIterator
<string
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1577
Returns
Section titled “Returns”IterableIterator
<string
>
set(
name
,value
):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1565
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
values()
Section titled “values()”values():
IterableIterator
<string
>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:1579
Returns
Section titled “Returns”IterableIterator
<string
>