vue-admin-template开发中在request请求中设置了Content-type,但是在在浏览器中查看请求主体并没有Content-type
service.interceptors.request.use(
config => {
if (store.getters.token) {
config.headers['X-Token'] = getToken();
}
config.headers["Content-type"] = "application/x-www-form-urlencoded"
return config
},
error => {
return Promise.reject(error)
}
)