Interface HttpClientOptions

interface HttpClientOptions {
    fetchOptions?: Omit<RequestInit,
        | "body"
        | "method"
        | "headers"
        | "signal">;
    headers?: Record<string, string>;
    timeout?: number;
    validateStatus?: ((status: number) => boolean);
}

Properties

fetchOptions?: Omit<RequestInit,
    | "body"
    | "method"
    | "headers"
    | "signal">

Additional RequestInit fields forwarded to fetch (e.g. credentials, mode, cache). Ignored: method, body, headers, signal — those are managed by the adapter.

headers?: Record<string, string>

Extra headers sent with each request.

timeout?: number

Request timeout in milliseconds. Uses AbortSignal.timeout under the hood.

validateStatus?: ((status: number) => boolean)

Predicate to decide which HTTP status codes resolve and which reject. Defaults to status >= 200 && status < 300.