Skip to content

BaseRequestOpts

Defined in: src/http-api/interface.ts:85

Options object for FetchHttpApi.requestOtherUrl.

  • Pick<RequestInit, "priority">

optional abortSignal?: AbortSignal

Defined in: src/http-api/interface.ts:90


optional headers?: Record<string, string>

Defined in: src/http-api/interface.ts:89

map of additional request headers


optional json?: boolean

Defined in: src/http-api/interface.ts:113

By default, we will:

  • If the body is an object, JSON-encode it and set Content-Type: application/json in the request headers (unless overridden by headers).

  • Set Accept: application/json in the request headers (again, unless overridden by headers).

  • Parse the response as JSON and return the parsed response.

Setting this to false inhibits all three behaviors, and the response is instead parsed as a UTF-8 string. It defaults to true, unless rawResponseBody is set.


optional keepAlive?: boolean

Defined in: src/http-api/interface.ts:96


optional localTimeoutMs?: number

Defined in: src/http-api/interface.ts:95

The maximum amount of time to wait before timing out the request. If not specified, there is no timeout.


optional priority?: RequestPriority

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:2569

Pick.priority


optional rawResponseBody?: boolean

Defined in: src/http-api/interface.ts:123

Setting this to true does two things: