axios post xml data方法

  • axios#request(config)
  • axios#get(url[,config])
  • axios#delete(url[,config])
  • axios#head(url[,config])
  • axios#post(url[,data[,config]])
  • axios#put(url[,data[,config]])
  • axios#patch(url[,data[,config]])

post方法中使用xml格式发送数据,可直接传入xml格式字符串。

axios.post(API_PROXY,
"<Request clientID='account' password='TEST'/>"
).then(function(response){
console.log(response);
}).catch(function(error){
console.log(error);
});
json可直接传入json对象或json String。

猜你喜欢

转载自www.cnblogs.com/sensorsen/p/9035938.html
今日推荐