axios-module
axios-module copied to clipboard
[Question] Customize config options without your own instance
Hello.
I've got a question. Am I somehow able to specify several config options (validateStatus
, paramsSerializer
and socketPath
, to be correct) without creating my own axios instance as mentioned here?
The point is If I'm extending axios with the described method, I'm no longer able to use built-in helpers such as onRequest
, onError
and so on, am I correct on this? I understand these helpers are just wrappers around native axios
interceptors and I can just copy the module's source code to handle them, but it doesn't seem to be a good option.
Could you explain this to me? Thanks in advance.
Hi @lennoximus
When creating a new instance of axios
following the documentation https://axios.nuxtjs.org/extend/#new-axios-instance
You are able to use all the helpers described https://axios.nuxtjs.org/helpers