open-nav
    Preparing search index...

    Interface TransportOptions

    interface TransportOptions {
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
        headers?: Record<string, string>;
        retries?: number;
        timeoutMs?: number;
    }
    Index
    fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>

    Injectable for testing and for runtimes with a custom fetch.

    headers?: Record<string, string>

    Extra headers, e.g. a correlation id for your own logs.

    retries?: number

    Retries for transport failures and 5xx responses. Defaults to 2.

    Only idempotent failures are retried: a manageInvoice that reached NAV must never be resent, because the requestId would be rejected as a replay and, worse, a genuinely delivered batch could be duplicated.

    timeoutMs?: number

    Per-attempt timeout in milliseconds. Defaults to 30 000.