Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add header info to response object #6

Open
harlow opened this issue Mar 1, 2015 · 1 comment
Open

Add header info to response object #6

harlow opened this issue Mar 1, 2015 · 1 comment

Comments

@harlow
Copy link
Member

harlow commented Mar 1, 2015

We return rate limiting data in the HTTP headers:

X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4050
X-RateLimit-Reset: 3300

Lets surface that data in the response object.

response = Clearbit::Person.find(email: 'alex@alexmaccaw.com')
response.headers["X-Next-Rate-Limit-Window"]

https://gist.github.com/croaky/d12b04fe940130834d12

@maccman
Copy link
Contributor

maccman commented Mar 1, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants