Skip to main content

HttpClientConfig

@forge/monorepo


@forge/monorepo / backend/src / HttpClientConfig

Type Alias: HttpClientConfig

HttpClientConfig = object

Defined in: backend/src/toolkit/http.ts:106

Properties

fetchImpl?

readonly optional fetchImpl?: typeof fetch

Defined in: backend/src/toolkit/http.ts:108


headersFor?

readonly optional headersFor?: (host) => Readonly<Record<string, string>> | undefined

Defined in: backend/src/toolkit/http.ts:116

Per-host request headers, from configuration. Called with the validated hostname only, so a header issued for one host cannot be sent to another by asking for a URL that merely mentions it.

Parameters

host

string

Returns

Readonly<Record<string, string>> | undefined


maxBytes?

readonly optional maxBytes?: number

Defined in: backend/src/toolkit/http.ts:109


nonce?

readonly optional nonce?: () => string

Defined in: backend/src/toolkit/http.ts:111

Returns

string


policy?

readonly optional policy?: EgressPolicy

Defined in: backend/src/toolkit/http.ts:107


randomHex?

readonly optional randomHex?: (bytes) => string

Defined in: backend/src/toolkit/http.ts:117

Parameters

bytes

number

Returns

string


timeoutMs?

readonly optional timeoutMs?: number

Defined in: backend/src/toolkit/http.ts:110