0

In my javascript code am trying to perform a GET HTTP request on an angular app. The request will comunicate with Qlik sense server, but i always get a 401 error (unauthorized). I performed the same get request on Postman and it retrieved the data. In and the error says Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. I have tried jQuery $.get, XMLHTTP Request and ajax, the result is the same.

Can you tell me how can i get the request done? In the server that i am trying to reach the configuration that the error displays is configured like Access-Control-Allow-Origin: *.

Thanks in advance

  • you need to do it on server side here are details https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS – sumeet kumar Apr 19 '18 at 20:44
  • What do your headers look like for the postman request? More source code and errors might help with debugging this problem. – Kyle Miller Apr 19 '18 at 20:47

0 Answers0