/after-try

after-try make axios retryable through interceptors

Primary LanguageJavaScript

after-try

after-try make axios retryable through interceptors

after-try is based off axios-retry


setupRetry :

const { setupRetry } = require('after-try');

const axiosClient = axios.create();

const retryOptions = {
    retries: 3
}

setupRetry(axiosClient, retryOptions);

override specific request :

axiosClient.get('/user', {
    'after-try': {
        retries: 5,
        retryCondition = () => {
            // you're specific retry condition logic
        }
    }
});