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

SauceLabs module should provide RateLimit headers to downstream libraries #31

Open
kennydrobnack opened this issue Feb 25, 2016 · 5 comments
Labels
Help Wanted Issues were the community can get involved

Comments

@kennydrobnack
Copy link

As part of a project, I'm using SauceLabs to test some code. SauceLabs recently announced they are rate limiting the number of API calls to their services.

http://sauceio.com/index.php/2016/02/announcing-new-rest-api-usage-limits/

One thing we wanted to do was to monitor the usage of the API calls and throw a warning if we are coming close to hitting the limits. However the SauceLabs library only provides the parsed JSON, not any of the headers (including the Rate Limit data).

The function that seems to be impacted by this is makeRequest in SauceLabs.js. Is there any easy way to provide the X-Ratelimit header data along with the JSON parsed response?

@danjenkins
Copy link
Contributor

We could add a third argument in the returned callback with the HTTP response which would include the code and headers etc? Then people could use any of that data? That would be easy to implement...

@unindented @OniOni what are your thoughts?

@unindented
Copy link
Contributor

@danjenkins Yup, that solution sounds reasonable.

@danjenkins
Copy link
Contributor

OK, feel free to send in a PR @kennydrobnack or I'll tackle this once I'm back from my honeymoon! :)

@PhearZero
Copy link
Contributor

@danjenkins Congratulations!

@kennydrobnack
Copy link
Author

Congrats @danjenkins! I've actually been pulled into another project at work and found that we're a ways off from hitting our rate limit. That may change in the next few months, but it's not urgent right now.

I'll keep myself subscribed to this and let the guys doing the SauceLabs tests know once this fix is available.

@christian-bromann christian-bromann added the Help Wanted Issues were the community can get involved label Mar 11, 2019
@christian-bromann christian-bromann added the Hacktoberfest Curated issues which are well scoped and ready to be worked on as part of Hacktoberfest label Oct 6, 2020
@christian-bromann christian-bromann removed the Hacktoberfest Curated issues which are well scoped and ready to be worked on as part of Hacktoberfest label Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Issues were the community can get involved
Projects
None yet
Development

No branches or pull requests

5 participants