curl方式可以查询到结果,但在localhost:3002下就会报错:
错误信息:
XMLHttpRequest cannot load https://api.leancloud.cn/1.1/user1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3002' is therefore not allowed access. The response had HTTP status code 404.
ajax请求代码(部分):
let url = 'https://api.leancloud.cn/1.1/user';
return axios.get(url, {headers: {'X-AVOSCloud-Application-Id': '', 'X-AVOSCloud-Application-Key': ''}
});
-
创建时间
15年6月4日
-
最后回复
15年6月8日
-
5
回复
-
2.5K
浏览
-
4
用户
-
4
链接