Libraries
    Preparing search index...

    Configuration for idempotency.

    interface IdempotencyOptions {
        condition?: (url: string, init: RequestInit) => boolean;
        headerName?: string;
        keyGenerator?: (url: string, init: RequestInit) => string;
    }
    Index

    Properties

    condition?: (url: string, init: RequestInit) => boolean

    Predicate that decides whether a request should receive a key. Defaults to true for POST, PUT, PATCH, DELETE.

    headerName?: string

    Header name to use for the idempotency key. Defaults to "X-Idempotency-Key".

    keyGenerator?: (url: string, init: RequestInit) => string

    Custom key generator. Receives (url, init) and returns a string. Defaults to generating a UUID v4.

    The key must be stable across retries of the same logical request. When not provided, a UUID is generated once and reused on retry.