--.nuxt
--index.js
import axios from 'axios'
Vue.prototype.$http = axios
axios.defaults.baseURL = host
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'
axios.defaults.headers['XPS-Version'] = '1.0.0'
Hi sir. Please take a look at this module for axios integration: https://github.com/nuxt-community/axios-module
PS: Content-Type is usually set correctly by axios, so there is no need to customize it.
@pi0
Thank you sincerely!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi sir. Please take a look at this module for axios integration: https://github.com/nuxt-community/axios-module
PS:
Content-Typeis usually set correctly by axios, so there is no need to customize it.