vue中利用axios请求获取服务器的txt文件的内容
var _this=this;axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';axios.get("http://139.196.20.27:8882/appBiz/test.txt").then(function (response)...
·
var _this=this;
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
axios.get("http://192.168.30.52:8882/test.html").then(function (response){
_this.getResult=response.data;
console.log("get请求",_this.getResult);
}).catch(function(error){
console.log(error);
});
更多推荐
已为社区贡献71条内容
所有评论(0)