Cashu-TS - v4.5.1
    Preparing search index...

    Type Alias RequestOptions

    RequestOptions: RequestArgs & Omit<RequestInit, "body" | "headers"> & Partial<
        Nut19Policy,
    > & {
        onResponseMeta?: (meta: ResponseMeta) => void;
        requestTimeout?: number;
    }

    Type Declaration

    • OptionalonResponseMeta?: (meta: ResponseMeta) => void

      Optional callback invoked on every HTTP response with structured rate-limit metadata. Fires before the promise resolves (on success) or rejects (on error), so consumers always receive metadata even when the request fails.

    • OptionalrequestTimeout?: number

      Per-request timeout in milliseconds. If a single fetch hangs longer than this, it is aborted and treated as a NetworkError (triggering retry on cached endpoints). Without this, a hung connection can consume the entire TTL retry window.