retry-axios
Advanced tools
Comparing version 0.3.0 to 0.3.2
{ | ||
"name": "retry-axios", | ||
"version": "0.3.0", | ||
"version": "0.3.2", | ||
"description": "Retry HTTP requests with Axios.", | ||
@@ -32,17 +32,17 @@ "main": "./build/src/index.js", | ||
"peerDependencies": { | ||
"axios": "^0.17.1" | ||
"axios": "*" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^2.2.43", | ||
"@types/mocha": "^2.2.48", | ||
"@types/nock": "^9.1.2", | ||
"@types/node": "^9.3.0", | ||
"axios": "^0.17.1", | ||
"@types/node": "^9.4.6", | ||
"axios": "^0.18.0", | ||
"codecov": "^3.0.0", | ||
"gts": "^0.5.1", | ||
"gts": "^0.5.3", | ||
"js-green-licenses": "^0.4.0", | ||
"mocha": "^5.0.0", | ||
"mocha": "^5.0.1", | ||
"nock": "^9.1.6", | ||
"nyc": "^11.2.1", | ||
"source-map-support": "^0.5.0", | ||
"typescript": "~2.6.0" | ||
"nyc": "^11.4.1", | ||
"source-map-support": "^0.5.3", | ||
"typescript": "~2.7.2" | ||
}, | ||
@@ -49,0 +49,0 @@ "files": [ |
@@ -41,2 +41,7 @@ # retry-axios | ||
const myAxiosInstance = axios.create(); | ||
myAxiosInstance.defaults = { | ||
raxConfig: { | ||
instance: myAxiosInstance | ||
} | ||
} | ||
const interceptorId = rax.attach(myAxiosInstance); | ||
@@ -71,2 +76,6 @@ const res = await myAxiosInstance.get('https://test.local'); | ||
// If you are using a non static instance of Axios you need | ||
// to pass that instance here (const ax = axios.create()) | ||
instance: ax, | ||
// You can detect when a retry is happening, and figure out how many | ||
@@ -73,0 +82,0 @@ // retry attempts have been made |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27863
127