用 ajax 发请求时,错误信息中 readyState
和 status
都正常, 而 statusText
是 "load",请问一下这是什么错误。我在网上找的大家都是 statusText:"success"
错误
handleClick() {
$.ajax({
url:'http://*****/user.json',
type: 'get',
dataType: 'jsonp',
success: function(data){
console.log(data);
this.state.data = data;
},
error:function(err){
console.log(err);
}
})
}
response 中也拿到了 json 数据:
这是打印的信息
巴扎黑2017-04-11 11:04:44
http://stackoverflow.com/ques...
That suggests that the HTTP request was successful but the attempt to parse the data was not.
i.e. that the data was not formatted as JSONP.