JavaScript中发起ajax请求 chrome报错 Failed to load resource: net::ERR_INVALID_HTTP_RESPONSE 又刷新了一下报错 jquery.js:661 GET http://www.liulongbin.top:3306/api/getbooks net::ERR_INVALID_HTTP_RESPONSE (使用postman测试过 该接口完全可用)
代码部分:
window.onload= function getBookList(){
// 发起ajax请求获得图书列表数据
$.get('http://www.liulongbin.top:3306/api/getbooks',function(res){
console.log(res);
})
请教各位能不能帮我解决一下这个问题,困扰好久了,在百度上搜的都是python方面的解决方法,谢谢了!
Apart from other error, You're leftover a });