Libraries
    Preparing search index...

    Function idempotency

    • Server-side idempotency middleware.

      Reads the x-idempotency-key header from mutating requests. If a response has already been stored for that key, it is returned immediately — the handler is never called. Otherwise the handler executes and its response is stored for future replays.

      GET, HEAD, and OPTIONS requests pass through without checking.

      Parameters

      Returns Middleware

      A server-side Middleware.

      server.handle(CreateTodo, createHandler, {
      middlewares: [idempotency({ ttl: 86_400_000 })]
      });