Liberator.Resource.too_many_requests-question-mark
You're seeing just the callback
too_many_requests-question-mark
, go back to Liberator.Resource module for more information.
Specs
too_many_requests?(Plug.Conn.t()) :: true | false
Check to see if the client has performed too many requests. Used as part of a rate limiting scheme.
If you return a map containing a :retry_after
key,
then the response's retry-after
header will be automatically set.
The value of this key can be either an Elixir DateTime
object,
a String
HTTP date, or an integer of seconds.
All of these values tell the client when they can attempt their request again.
Note that if you provide a String
for this value,
it should be formatted as an HTTP date.
If you do return map with the key :retry_after
set,
and its value is not a DateTime
, integer, or valid String
,
then Liberator will raise an exception.
By default, always returns false
.