nx.js
Classes

Headers

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(). In all methods of this interface, header names are matched by case-insensitive byte sequence.

MDN Reference

Implements

Constructors

new Headers()

new Headers(init?): Headers

Parameters

ParameterType
init?HeadersInit

Returns

Headers

Methods

[iterator]()

[iterator](): HeadersIterator<[string, string]>

Same as entries().

Returns

HeadersIterator<[string, string]>

Implementation of

globalThis.Headers.[iterator]


append()

append(name, value): void

MDN Reference

Parameters

ParameterType
namestring
valuestring

Returns

void

Implementation of

globalThis.Headers.append


delete()

delete(name): void

MDN Reference

Parameters

ParameterType
namestring

Returns

void

Implementation of

globalThis.Headers.delete


entries()

entries(): HeadersIterator<[string, string]>

Returns an iterator allowing to go through all key/value pairs contained in this object.

Returns

HeadersIterator<[string, string]>

Implementation of

globalThis.Headers.entries


forEach()

forEach(callbackfn, thisArg?): void

Parameters

ParameterType
callbackfn(value, key, parent) => void
thisArg?any

Returns

void

Implementation of

globalThis.Headers.forEach


get()

get(name): null | string

MDN Reference

Parameters

ParameterType
namestring

Returns

null | string

Implementation of

globalThis.Headers.get


getSetCookie()

getSetCookie(): string[]

MDN Reference

Returns

string[]

Implementation of

globalThis.Headers.getSetCookie


has()

has(name): boolean

MDN Reference

Parameters

ParameterType
namestring

Returns

boolean

Implementation of

globalThis.Headers.has


keys()

keys(): HeadersIterator<string>

Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.

Returns

HeadersIterator<string>

Implementation of

globalThis.Headers.keys


set()

set(name, value): void

MDN Reference

Parameters

ParameterType
namestring
valuestring

Returns

void

Implementation of

globalThis.Headers.set


values()

values(): HeadersIterator<string>

Returns an iterator allowing to go through all values of the key/value pairs contained in this object.

Returns

HeadersIterator<string>

Implementation of

globalThis.Headers.values

On this page