You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will be able to access request headers in the metadata with the 3.x version of the API client. The 3.x release is currently in review and will likely get merged in the next week or so. #36
However the rate limiting data will be added not to the response additionalData block (as you gave the example) but instead it will be accessible from the callback's third argument, as in:
Furthermore I have added a linear backoff strategy to the client itself, which honours the rate limiting headers given by the API server. That means you could rely on this logic and not worry about rate limiting on your own — or, alternatively, you can feel free to review the code in the pull request #36 and improve it as you like, then submit a pull request to us for review.
Hey, it's been long here, but following up that starting from v36.1.0 every API method now has a WithHttpInfo variant (e.g. getDealWithHttpInfo) that resolves with { data, status, headers }, so the HTTP status and response headers, such as rate limit headers, can be read. The existing methods are unchanged and still return only the response body. The new methods can be used like this:
Activity
martintajur commentedon Jan 5, 2017
You will be able to access request headers in the metadata with the 3.x version of the API client. The 3.x release is currently in review and will likely get merged in the next week or so. #36
However the rate limiting data will be added not to the response additionalData block (as you gave the example) but instead it will be accessible from the callback's third argument, as in:
martintajur commentedon Jan 5, 2017
Furthermore I have added a linear backoff strategy to the client itself, which honours the rate limiting headers given by the API server. That means you could rely on this logic and not worry about rate limiting on your own — or, alternatively, you can feel free to review the code in the pull request #36 and improve it as you like, then submit a pull request to us for review.
pcothenet commentedon Jan 5, 2017
Awesome, that should work for me, thanks!
martintajur commentedon Jan 10, 2017
Closing the issue for now, hoping to get 3.0 out soon.
siirimangus commentedon Oct 21, 2026
Hey, it's been long here, but following up that starting from v36.1.0 every API method now has a
WithHttpInfovariant (e.g.getDealWithHttpInfo) that resolves with{ data, status, headers }, so the HTTP status and response headers, such as rate limit headers, can be read. The existing methods are unchanged and still return only the response body. The new methods can be used like this:Check the CHANGELOG here.