HTTP API速率限制HTTP响应头的示例

其中一个额外的HTTP状态码( RFC6585 )是

  • 429太多的请求

我在哪里可以find对HTTP响应状态有用的HTTP / REST API速率限制HTTP响应头的示例?

2 Solutions collect form web for “HTTP API速率限制HTTP响应头的示例”

以下是HTTP API速率限制HTTP响应标头的一些示例。 来自四个常见的REST API:Github,Vimeo,Twitter和Imgur:

Github费率限制http://developer.github.com/v3/#rate-limiting

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-Limit | Request limit per hour | +-----------------------------+---------------------------------------------+ | X-RateLimit-Remaining | The number of requests left for the time | | | window | +-----------------------------+---------------------------------------------+ 

Vimeo速率限制http://developer.vimeo.com/guidelines/rate-limiting

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-Limit | Request limit per day / per 5 minutes | +-----------------------------+---------------------------------------------+ | X-RateLimit-Remaining | The number of requests left for the time | | | window | +-----------------------------+---------------------------------------------+ | X-RateLimit-Reset | The remaining window before the rate limit | | | resets in UTC epoch seconds | +-----------------------------+---------------------------------------------+ 

Twitter的REST API速率限制https://dev.twitter.com/docs/rate-limiting/1.1

注意: Twitter使用类似Vimeo这样的名称,但在每个名称中都有另一个短划线。

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-Rate-Limit-Limit | The rate limit ceiling for that given | | | request | +-----------------------------+---------------------------------------------+ | X-Rate-Limit-Remaining | The number of requests left for the | | | 15 minute window | +-----------------------------+---------------------------------------------+ | X-Rate-Limit-Reset | The remaining window before the rate limit | | | resets in UTC epoch seconds | +-----------------------------+---------------------------------------------+ 

Imgur API比率限制http://api.imgur.com/

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-UserLimit | Total credits that can be allocated | +-----------------------------+---------------------------------------------+ | X-RateLimit-UserRemaining | Total credits available | +-----------------------------+---------------------------------------------+ | X-RateLimit-UserReset | Timestamp (unix epoch) for when the credits | | | will be reset | +-----------------------------+---------------------------------------------+ | X-RateLimit-ClientLimit | Total credits that can be allocated for the | | | application in a day | +-----------------------------+---------------------------------------------+ | X-RateLimit-ClientRemaining | Total credits remaining for the application | | | in a day | +-----------------------------+---------------------------------------------+ 

除了API特定的标题之外,不要忘记标准的Retry-After标题。

  • 访问控制 - 允许 - 来源错误发送到Google API的jQuery邮政
  • 在REST泽西例外
  • RestSharp简单完整的例子
  • graphicsHTTP客户端的Windows
  • REST vs JSON-RPC?
  • Powershell v3 Invoke-WebRequest HTTPS错误
  • 无法在HttpResponseMessage标头上设置Content-Type标头?
  • 使用PHP创build一个REST API
  • REST内容types:它应该基于扩展还是Accept头?
  • 有谁知道遵循HATEOAS原则的RESTful客户端的例子吗?
  • WebSocket与其他API的实时数据?