IBM Watson Conversation API: “Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response”

前端 未结 2 1939
长情又很酷
长情又很酷 2021-01-26 20:23

I created a React-Native app that connected to the Watson REST APIs. Using the fetch library that is part of the ReactNative, everything was working well for getting the Workspa

2条回答
  •  难免孤独
    2021-01-26 21:22

    The browser is refusing to send your request because the server you're sending the request to hasn't enabled CORS, at least not with those headers.

    The only solution without modifying the server you're targeting is to write your own server that makes the request on behalf of the client.

提交回复
热议问题