Axios-module: how to use "timeout" in this module???

Created on 15 Dec 2017  路  3Comments  路  Source: nuxt-community/axios-module

I'd like use 'timeout' in my project,and how to do???

This question is available on Nuxt.js community (#c56)

Most helpful comment

I assume this person is wondering how to set the default axios timeout when using this module. You could do it in a plugin using $axios.defaults.timeout, but I would have assumed you could do it within the axios section of nuxt.config.js, but that doesn't seem to work.

All 3 comments

Please provide more details.

I assume this person is wondering how to set the default axios timeout when using this module. You could do it in a plugin using $axios.defaults.timeout, but I would have assumed you could do it within the axios section of nuxt.config.js, but that doesn't seem to work.

In the nuxt project simply add it to the plugin/axios.js file inside export function
$axios.defaults.timeout = timeInMilliseconds

小薪懈屑芯泻 褝泻褉邪薪邪 2019-09-03 胁 15 26 54

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jb-alvarado picture jb-alvarado  路  3Comments

cawa-93 picture cawa-93  路  4Comments

megapctr picture megapctr  路  5Comments

ealves-pt picture ealves-pt  路  3Comments

lyzs90 picture lyzs90  路  4Comments