API Reference
@univerjs
@univerjs/network
classes
Httpheaders

@univerjs/network v0.4.2Docs


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

packages/network/src/services/http/headers.ts:30 (opens in a new tab)

Methods

forEach()

forEach(callback): void

Parameters

ParameterType
callback(name, value) => void

Returns

void

Defined in

packages/network/src/services/http/headers.ts:40 (opens in a new tab)


get()

get(key): null | string[]

Parameters

ParameterType
keystring

Returns

null | string[]

Defined in

packages/network/src/services/http/headers.ts:48 (opens in a new tab)


has()

has(key): boolean

Parameters

ParameterType
keystring

Returns

boolean

Defined in

packages/network/src/services/http/headers.ts:44 (opens in a new tab)


set()

set(key, value): void

Parameters

ParameterType
keystring
valuestring | number | boolean

Returns

void

Defined in

packages/network/src/services/http/headers.ts:53 (opens in a new tab)


toHeadersInit()

toHeadersInit(): HeadersInit

Returns

HeadersInit

Defined in

packages/network/src/services/http/headers.ts:57 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.