Skip to content

Commit 7221cac

Browse files
author
Pooya Parsa
committed
feat: support retry with axios-retry
#77
1 parent a923db3 commit 7221cac

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

lib/module.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ module.exports = function nuxtAxios (_moduleOptions) {
4040
progress: true,
4141
proxyHeaders: true,
4242
proxyHeadersIgnore: ['accept', 'host'],
43-
proxy: false
43+
proxy: false,
44+
retry: false
4445
},
4546
moduleOptions
4647
)

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"dependencies": {
3737
"@nuxtjs/proxy": "^1.1.4",
3838
"axios": "^0.17.1",
39+
"axios-retry": "^3.0.1",
3940
"chalk": "^2.3.0",
4041
"debug": "^3.1.0"
4142
},

yarn.lock

+10
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,12 @@ aws4@^1.2.1, aws4@^1.6.0:
345345
version "1.6.0"
346346
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
347347

348+
axios-retry@^3.0.1:
349+
version "3.0.1"
350+
resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.0.1.tgz#519305b0ae34b68d67fd92e45e5f18057879febd"
351+
dependencies:
352+
is-retry-allowed "^1.1.0"
353+
348354
axios@^0.17.1:
349355
version "0.17.1"
350356
resolved "https://registry.yarnpkg.com/axios/-/axios-0.17.1.tgz#2d8e3e5d0bdbd7327f91bc814f5c57660f81824d"
@@ -3764,6 +3770,10 @@ is-resolvable@^1.0.0:
37643770
version "1.1.0"
37653771
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
37663772

3773+
is-retry-allowed@^1.1.0:
3774+
version "1.1.0"
3775+
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
3776+
37673777
is-stream@^1.0.1, is-stream@^1.1.0:
37683778
version "1.1.0"
37693779
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"

0 commit comments

Comments
 (0)