Interface ThrottlingHeaders


@UnstableApi public interface ThrottlingHeaders
A RateLimit Header Scheme for HTTP.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ThrottlingHeaders
    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 Type
    Method
    Description
    io.netty.util.AsciiString
    Returns the name of the "limit" throttling header for the given scheme, like "X-RateLimit-Limit".
    io.netty.util.AsciiString
    Returns the name of the "remaining" throttling header for the given scheme, like "X-RateLimit-Remaining".
    io.netty.util.AsciiString
    Returns the name of the "reset" throttling header for the given scheme, like "X-RateLimit-Reset".
  • Field Details

    • RATELIMIT

      static final ThrottlingHeaders RATELIMIT
      Describes RateLimit Header Fields for HTTP. For example:
      
       RateLimit-Limit: 10
       RateLimit-Remaining: 1
       RateLimit-Reset: 7
       
    • X_RATELIMIT

      static final ThrottlingHeaders 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

      static final ThrottlingHeaders 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

      io.netty.util.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

      io.netty.util.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

      io.netty.util.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.