我在chrome上安装了CORS扩展程序,但是在尝试调用提取时遇到了几个问题:
对预检请求的响应未通过访问控制检查:它没有HTTP OK状态。
根据一些帖子尝试正确设置我的标题,但仍然没有运气:
let headers = new Headers();
headers.append('Content-Type', 'application/json');
headers.append('Accept', 'application/json');
//Origin, X-Requested-With, Content-Type, Accept, Authorization
headers.append('Access-Control-Allow-Origin', '*');
//Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
headers.append('Access-Control-Allow-Headers', 'Origin, X-Requested-With,
Content-Type, Accept');