hapi-idempotency
v0.0.1
Published
an idempotency layer that will be used to make all POST and PUT requested idempotent
Downloads
3
Readme
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
References
https://stripe.com/docs/api/idempotent_requests https://brandur.org/idempotency-keys