Interface ThrottlingHeaders
public interface ThrottlingHeaders
A RateLimit Header Scheme for HTTP.
-
Field Summary
Fields Modifier and Type Field Description static ThrottlingHeaders
RATELIMIT
Describes RateLimit Header Scheme for HTTP.static ThrottlingHeaders
X_RATE_LIMIT
Describes another alternative RateLimit Header Scheme for HTTP, used by Twitter.static ThrottlingHeaders
X_RATELIMIT
Describes an alternative RateLimit Header Scheme for HTTP, used by Github and Vimeo. -
Method Summary
Modifier and Type Method Description AsciiString
limitHeader()
Returns the name of the "limit" throttling header for the given scheme, like "X-RateLimit-Limit".AsciiString
remainingHeader()
Returns the name of the "remaining" throttling header for the given scheme, like "X-RateLimit-Remaining".AsciiString
resetHeader()
Returns the name of the "reset" throttling header for the given scheme, like "X-RateLimit-Reset".
-
Field Details
-
RATELIMIT
Describes RateLimit Header Scheme 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.
-