softonic/axios-retry

Feature request: Handle async onRetry function

Closed this issue · 2 comments

Hi,

Can you add support for async onRetry functions?
Can I make a PR to make that happen?

One use case example is to refresh a token on 401

@netanelep, per the docs, onRetry is "A callback to notify when a retry is about to occur. Useful for tracing." and so async support isn't necessary.

retryCondition, however, does support async and it's been used to support logic like refreshing a token.

this is added in 3.8.1