No 'Access-Control-Allow-Origin' header is present on the requested resource

No 'Access-Control-Allow-Origin' header is present on the requested resource

  

why does my javascript get a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error when Postman does not?



Hi,

Please check this almost 5-year old post I found while searching for that message online.

The main takeaway, from that post and Google Chrome's developer documentation is:

Regular web pages can use the XMLHttpRequest object to send and receive data from remote servers, but they're limited by the same origin policy. 

Hope this helps understanding your issue.

Jorge Martins wrote:

Hi,

Please check this almost 5-year old post I found while searching for that message online.

The main takeaway, from that post and Google Chrome's developer documentation is:

Regular web pages can use the XMLHttpRequest object to send and receive data from remote servers, but they're limited by the same origin policy. 

Hope this helps understanding your issue.

Hello Jorge,

Thank you for your answer.

I have asked to this API's developer and they told me to access API from server side not from client side.
Do you know how to call this kind of API from server side in Outsystem environtment?
Thank you very much.


Hi Meri,

Take a look at this link about how to consume REST APIs with Outsystems. Hope it helps.

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/REST/Consume_REST_APIs