Skip to content

Interface: HttpOptions

Defined in: src/http.ts:20

Configuration options for the HTTP client.

Properties

baseUrl

ts
baseUrl: string;

Defined in: src/http.ts:22

Base URL for all API requests


headers?

ts
optional headers: Record<string, string>;

Defined in: src/http.ts:24

Default headers to include in all requests


retry?

ts
optional retry: HttpRetry;

Defined in: src/http.ts:26

Retry configuration for failed requests


fetchImpl()?

ts
optional fetchImpl: {
  (input, init?): Promise<Response>;
  (input, init?): Promise<Response>;
};

Defined in: src/http.ts:28

Custom fetch implementation (useful for Node.js < 18 or testing)

Call Signature

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters
ParameterType
inputURL | RequestInfo
init?RequestInit
Returns

Promise<Response>

Call Signature

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters
ParameterType
inputstring | URL | Request
init?RequestInit
Returns

Promise<Response>