@univerjs/network v0.5.0-beta.1Docs


Class: HTTPHeaders

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

Constructors

new HTTPHeaders()

new HTTPHeaders(headers?): HTTPHeaders

Parameters

ParameterType
headers?string | IHeadersConstructorProps | Headers

Returns

HTTPHeaders

Defined in

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

Methods

forEach()

forEach(callback): void

Parameters

ParameterType
callback(name, value) => void

Returns

void

Defined in

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


get()

get(key): null | string[]

Parameters

ParameterType
keystring

Returns

null | string[]

Defined in

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


has()

has(key): boolean

Parameters

ParameterType
keystring

Returns

boolean

Defined in

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


set()

set(key, value): void

Parameters

ParameterType
keystring
valuestring | number | boolean

Returns

void

Defined in

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


toHeadersInit()

toHeadersInit(): HeadersInit

Returns

HeadersInit

Defined in

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