mirror of
https://github.com/ditkrg/idempotent-request.git
synced 2026-01-22 22:06:44 +00:00
update readme
This commit is contained in:
parent
517dc5c007
commit
4dd442ef56
@ -120,9 +120,14 @@ end
|
|||||||
Get notified when the client sends a request with the same idempotency key:
|
Get notified when the client sends a request with the same idempotency key:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class RailsCallback < Callback
|
class RailsCallback
|
||||||
|
attr_reader :request
|
||||||
|
|
||||||
|
def initialize(request)
|
||||||
|
@request = request
|
||||||
|
end
|
||||||
|
|
||||||
def detected(key:)
|
def detected(key:)
|
||||||
# `request` is also available
|
|
||||||
Rails.logger.warn "IdempotentRequest request detected, key: #{key}"
|
Rails.logger.warn "IdempotentRequest request detected, key: #{key}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user