Skip to content

Instantly share code, notes, and snippets.

@mikesparr
Created June 4, 2015 22:23
Show Gist options
  • Save mikesparr/f801344abb6a673a77af to your computer and use it in GitHub Desktop.
Save mikesparr/f801344abb6a673a77af to your computer and use it in GitHub Desktop.
Goomzee API rate limiting tests
Mikebook-Pro-SSD:local mike$ curl -i -X GET --url http://localhost:8000/hello
HTTP/1.1 200 OK
Date: Thu, 04 Jun 2015 22:17:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 23
Connection: keep-alive
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 1
X-Powered-By: Turbo Hamsters
{"text":"Hello World!"}
Mikebook-Pro-SSD:local mike$ curl -i -X GET --url http://localhost:8000/hello
HTTP/1.1 200 OK
Date: Thu, 04 Jun 2015 22:17:31 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 23
Connection: keep-alive
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 0
X-Powered-By: Turbo Hamsters
{"text":"Hello World!"}
Mikebook-Pro-SSD:local mike$ curl -i -X GET --url http://localhost:8000/hello
HTTP/1.1 429
Date: Thu, 04 Jun 2015 22:17:32 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 0
{"message":"API rate limit exceeded"}
Mikebook-Pro-SSD:local mike$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment