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
Currently the Retry interface of the Resty client supports a custom condition for when to retry and a custom callback to calculate the time between retries. What I am currently missing is an OnRetry hook to execute side effecting operations whenever a request is retried.
For example, I have a use case where I want to authenticate with an API after an access token has expired. One potential way to solve that with resty would be to authenticate with the API if the request returned a 403. While it is currently possible to achieve this with the resty.Backoff, it would be much cleaner to have an OnRetry hook.
The text was updated successfully, but these errors were encountered:
Currently the Retry interface of the Resty client supports a custom condition for when to retry and a custom callback to calculate the time between retries. What I am currently missing is an
OnRetry
hook to execute side effecting operations whenever a request is retried.For example, I have a use case where I want to authenticate with an API after an access token has expired. One potential way to solve that with
resty
would be to authenticate with the API if the request returned a 403. While it is currently possible to achieve this with theresty.Backoff
, it would be much cleaner to have anOnRetry
hook.The text was updated successfully, but these errors were encountered: