@univerjs/network v0.5.4


Class: HTTPHeaders

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:27

It wraps headers of HTTP requests’ and responses’ headers.

Constructors

new HTTPHeaders()

new HTTPHeaders(headers?): HTTPHeaders

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:30

Parameters

ParameterType
headers?string | IHeadersConstructorProps | Headers

Returns

HTTPHeaders

Methods

forEach()

forEach(callback): void

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:40

Parameters

ParameterType
callback(name, value) => void

Returns

void


get()

get(key): null | string[]

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:48

Parameters

ParameterType
keystring

Returns

null | string[]


has()

has(key): boolean

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:44

Parameters

ParameterType
keystring

Returns

boolean


set()

set(key, value): void

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:53

Parameters

ParameterType
keystring
valuestring | number | boolean

Returns

void


toHeadersInit()

toHeadersInit(): HeadersInit

Defined in: submodules/univer/packages/network/src/services/http/headers.ts:57

Returns

HeadersInit