nuxt-community / axios-module

Secure and easy axios integration for Nuxt 2
https://axios.nuxtjs.org
MIT License
1.19k stars 245 forks source link

Cancelling promise in response interceptor #369

Closed Dean-Christian-Armada closed 3 years ago

Dean-Christian-Armada commented 4 years ago

Basically, my question is the exact one here https://github.com/axios/axios/issues/583. It can be done via throw new axios.Cancel('Operation canceled by the user.');.. But how can I do this in nuxt axios module?? I can not see it in the document and I tried $axios.Cancel('Error') but returned $axios.Cancel is not a constructor

ricardogobbosouza commented 3 years ago

Hi @Dean-Christian-Armada Sorry for delay response See docs https://axios.nuxtjs.org/usage#cancel-token