Interface ThrottlingHeaders
A RateLimit Header Scheme for HTTP.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ThrottlingHeaders
Describes RateLimit Header Fields for HTTP.static final ThrottlingHeaders
Describes another alternative RateLimit Header Scheme for HTTP, used by Twitter.static final ThrottlingHeaders
Describes an alternative RateLimit Header Scheme for HTTP, used by Github and Vimeo. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the "limit" throttling header for the given scheme, like "X-RateLimit-Limit".Returns the name of the "remaining" throttling header for the given scheme, like "X-RateLimit-Remaining".Returns the name of the "reset" throttling header for the given scheme, like "X-RateLimit-Reset".
-
Field Details
-
RATELIMIT
Describes RateLimit Header Fields for HTTP. For example:RateLimit-Limit: 10 RateLimit-Remaining: 1 RateLimit-Reset: 7
-
X_RATELIMIT
Describes an alternative RateLimit Header Scheme for HTTP, used by Github and Vimeo. For example:X-RateLimit-Limit: 10 X-RateLimit-Remaining: 1 X-RateLimit-Reset: 7
-
X_RATE_LIMIT
Describes another alternative RateLimit Header Scheme for HTTP, used by Twitter. For example:X-Rate-Limit-Limit: 10 X-Rate-Limit-Remaining: 1 X-Rate-Limit-Reset: 7
-
-
Method Details
-
limitHeader
AsciiString limitHeader()Returns the name of the "limit" throttling header for the given scheme, like "X-RateLimit-Limit". This header specifies the requests quota for the given time window. -
remainingHeader
AsciiString remainingHeader()Returns the name of the "remaining" throttling header for the given scheme, like "X-RateLimit-Remaining". This header specifies the remaining requests quota for the current time window. -
resetHeader
AsciiString resetHeader()Returns the name of the "reset" throttling header for the given scheme, like "X-RateLimit-Reset". This header specifies the time remaining in the current window. Its value defined in seconds or as a timestamp.
-