Interface WaberyOptions

interface WaberyOptions {
    apiKey?: string;
    apiVersion?: string;
    baseUrl?: string;
    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    };
    maxRetries?: number;
    timeoutMs?: number;
}

Properties

apiKey?: string
apiVersion?: string
baseUrl?: string
fetch?: {
    (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    (input: string | URL | Request, init?: RequestInit): Promise<Response>;
}

Type declaration

    • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

    • (input: string | URL | Request, init?: RequestInit): Promise<Response>
    • Parameters

      • input: string | URL | Request
      • Optionalinit: RequestInit

      Returns Promise<Response>

maxRetries?: number

How many times to retry transient gateway errors (HTTP 502/503/504) and network failures before throwing. Defaults to 3. Set to 0 to disable.

timeoutMs?: number

Per-request timeout in milliseconds. A timed-out request is aborted and retried like a network failure. Defaults to 120000 (matches the origin gateway). Set to 0 to disable.