-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Request: Include remaing rate-limit in responses #504
Comments
Possibly related to #352 |
Going to move this to post-v1 as I think this is hard to do without impacting existing APIs |
Couple of options maybe:
I'm currently using the former in some test code - but doesn't feel correct to add to a PR. |
I think 1) is going to be a more maintainable solution in the long-term. The other solution means deserializing becomes a two-step operation (read the content, then read the headers). Would love to hear your concerns. |
Gonna have a go at option 1 and produce a PR for review (hopefully next 24 hours) Basically just going to provide a property on the client which calls through to connection which calls through the HTTPClientAdaptor (which will store the last ApiInfo during the Send). Putting the chained calls all the way through the stack avoids having to keep a reference to the HttpClientAdaptor - which makes it easier for the user. |
As this requires significant thought - and likely significant changes to the API responses - as well as there exists the ability to get this data using I've opened #1142 to add some documentation for this feature before I forget. |
For example, in the SearchCodeResult (and all other Result objects), include a remaining rate limits.
This will allow an extremely simple to implement throttling of my requests
The text was updated successfully, but these errors were encountered: