HTTP.jl
HTTP.jl copied to clipboard
Feature: add custom delay parameter for RetryLayer
This would allow people to give a custom ExponentialBackoff (useful for rate-limited endpoints) or even a straight linear retry scheme.
I'm happy to work on this if desired.
So currently, we allow passing keyword args retry::Bool=true, retries::Int=4, and then we have delays=ExponentialBackOff(n = retries),. Is there more customization desired here still? (sorry, I know this issue is pretty old)
Yes; ideally we can control the whole backoff. Being able to pass the delays argument through would work.
Backoff that deals with rate limits shouldn't be reliant on the Base defaults for ExponentialBackoff like the first_delay=0.05.
Ok, that sounds reasonable to me; going to mark this as "help wanted" + "enhancement" and put it in the 1.X milestone as it will be easy to add post 1.0 and won't require breaking anything. If someone would like to take a stab at this, just comment here and I'll assign it to you.