当我试图使用localhost api发送post请求时,我得到了这个错误:
Access to fetch at 'http://127.0.0.1:8000/my-api/' from originIf an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with这是
我正在尝试用一个持有者密钥做一个GET请求,但是我不明白为什么它不能工作。在Postman中,GET请求工作得很好,但在我的React.js应用程序中却无法实现。我在控制台日志中收到401未授权错误。我添加了mode: 'no-cors',因为否则我会出现Failed to fetch错误。error: null,