latch-store - v0.2.4
    Preparing search index...

    Function processIdempotentKey

    • Process an idempotent request.

      Called by framework adapters once they have extracted the idempotency key and buffered the request body. Returns a fully formed HTTP response.

      Parameters

      • key: string

        The idempotency key from the Idempotency-Key header.

      • bodyBytes: Uint8Array

        The raw request body bytes.

      • handler: () => Promise<CapturedResponse>

        The actual request handler to execute (once).

      • store: Store

        The store adapter for persisting idempotency state.

      • ttlMs: number = DEFAULT_TTL_MS

        Key TTL in milliseconds. Defaults to 24h if 0.

      • OptionalonEvent: (event: IdempotencyEvent) => void

        Optional callback for idempotency lifecycle events.

      Returns Promise<IdempotentResult>