We would like to add support for v3 Web API rate limits, as described here.
_How would you like this to be implemented?_ Or please give a thumbs up to express your interest in us implementing to move this task up our queue.
PRs are always welcome as well :)
I've updated from v6 to v8 but I'm not using the library directly. Instead I'm using it via WebJobs.Extensions.SendGrid. Since this is a task that listens to a queue and sends the email as they come in, and there can be multiple instances if I scale out, having support for rate limit checking would be very useful.
I'm curious how you will implement this feature.
In the StrongGrid library, I have added a IRetryStrategy parameter to the Client constructor which allows any custom strategy to be provided (this is particularly useful during unit testing where I can provide a mocked retry strategy) and also I have provided a default implementation of this interface which uses the "rate limit reset" header to calculate how much time to wait before retrying the same HTTP request.
Hi @Jericho,
We have not considered implementation just yet, but it sounds like you have an elegant solution. I'll be sure to check out your implementation when the time comes.
Please see here.
@thinkingserious the PR you reference retries requests when a response with HTTP status code in the 500-504 range is received which does not address "rate limiting" because the HTTP status code is 429.
Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!
Most helpful comment
@thinkingserious the PR you reference retries requests when a response with HTTP status code in the 500-504 range is received which does not address "rate limiting" because the HTTP status code is 429.