hapi-idempotency

0.0.1 • Public • Published

hapi-idempotency-layer

Make any HTTP request idempotent by letting the client send an idemotency key in the request headers

idempotency-key

An idempotency key is a unique value that’s generated by a client and sent to an API along with a request. The server stores the key to use for bookkeeping the status of that request on its end. If a request should fail partway through, the client retries with the same idempotency key value, and the server uses it to look up the request’s state and continue from where it left off. The name “idempotency key” comes from Stripe’s API.

limitations

  • only supports hapi v16

Features

  • make any PUT or POST request idempotent
  • utilizes Redis to store requests session data
  • integrated as a hapi plugin ( 1 line of code)

workflow

Image description

References

https://stripe.com/docs/api/idempotent_requests https://brandur.org/idempotency-keys

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i hapi-idempotency

    Weekly Downloads

    2

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    7.25 kB

    Total Files

    4

    Last publish

    Collaborators

    • jodevsa