axios 配置 content-type
1、
axios({ method:'get', url:'http://bit.ly/2mTM3nY1233455,
headers: {
'content-type': 'text/xml'
},
data: {}
}) .then(function(response) { });
2、
axios({
method:'get',
url:'http://bit.ly/2mTM3nY1233455,
transformRequest: [function (data, headers) {
headers.common['Content-Type'] = 'text/xml';
return headers
}],
})
.then(function(response) {
});