반응형
HTTP API 속도 제한 HTTP 응답 헤더의 예
추가 HTTP 상태 코드 ( RFC6585 ) 중 하나는 다음과 같습니다.
이 HTTP 응답 상태에 유용한 HTTP / REST 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
헤더를 잊지 마십시오 .
반응형
'Programing' 카테고리의 다른 글
jaxb / Maven에게 여러 스키마 패키지를 생성하도록 어떻게 알릴 수 있습니까? (0) | 2020.10.24 |
---|---|
대상 Google API와 대상 Android의 차이점 (0) | 2020.10.24 |
여러 외래 키와 Rails 연관 (0) | 2020.10.24 |
Postgresql을 다시 시작하는 방법 (0) | 2020.10.24 |
Linux : 주어진 폴더 및 콘텐츠에 대해 단일 해시를 계산합니까? (0) | 2020.10.24 |