Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mindhells
mindhells / index.ts
Created October 18, 2021 12:09
axios retry TS basic example
import axios from 'axios';
import axiosRetry from 'axios-retry';
axiosRetry(axios, { retries: 3 });
axios.get('http://example.com/test') // The first request fails and the second returns 'ok'
.then(result => {
result.data; // 'ok'
});