diff --git a/README.md b/README.md index 0ddb544..c5c3b3c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,8 @@ config.middleware.use IdempotentRequest::Middleware, header_key: 'X-Qonto-Idempotency-Key', # by default Idempotency-key policy: IdempotentRequest::Policy, callback: IdempotentRequest::RailsCallback, - storage: IdempotentRequest::RedisStorage.new(::Redis.current, expire_time: 1.day, namespace: 'idempotency_keys') + storage: IdempotentRequest::RedisStorage.new(::Redis.current, expire_time: 1.day, namespace: 'idempotency_keys'), + conflict_response_status: 409 ``` ### Policy @@ -134,7 +135,7 @@ end ### Callback -Get notified when the client sends a request with the same idempotency key: +Get notified when a client sends a request with the same idempotency key: ```ruby class RailsCallback @@ -150,6 +151,10 @@ class RailsCallback end ``` +### Conflict response status + +Define http status code that should be returned when a client sends concurrent requests with the same idempotency key. + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/idempotent-request. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.