Idempotency-Key header support for Grape REST APIs, based on the IETF Idempotency-Key HTTP header draft. Wrap a POST or PATCH endpoint in an idempotent block and clients can safely retry requests after timeouts or network errors without creating duplicate payments, orders or records. The first response (status, headers and body) is stored in Redis and replayed for retries with the same key. Concurrent duplicate requests get a 409 Conflict, and reusing a key with a different payload gets a 422 Unprocessable Entity. Works with Grape 1.x to 4.x and Ruby 2.6+.

Required Ruby Version

>= 2.6

Authors

Juan Carlos García

Versions

  1. 1.2.0
    1. source

      1. 1.2.0 source October 15, 2026 (19 KB)
  2. 1.1.1
    1. source

      1. 1.1.1 source October 15, 2026 (14.5 KB)
  3. 1.1.0
    1. source

      1. 1.1.0 source December 12, 2023 (13 KB)
  4. 1.0.0
    1. source

      1. 1.0.0 source November 23, 2023 (12 KB)
  5. 0.1.3
    1. source

      1. 0.1.3 source November 07, 2023 (10 KB)
Show all versions (8 total)

Pushed by

SHA 256 checksum