0

Hey I am facing this Issue when I am Hitting API from my angular 2 application

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

How to send header request in get method ?

Affan Shaikh
  • 51
  • 1
  • 4
  • 2
    You need to implement CORS on the server side. There are lots of samples out there on SO and elsewhere. – Jon B Jul 06 '17 at 19:51
  • Similar question was already asked here: https://stackoverflow.com/questions/36768418/how-to-make-cors-enabled-http-requests-in-angular-2 – Ostap Gonchar Jul 06 '17 at 20:06
  • Possible duplicate of [How to make CORS-enabled HTTP requests in Angular 2?](https://stackoverflow.com/questions/36768418/how-to-make-cors-enabled-http-requests-in-angular-2) – Gosha_Fighten Jul 06 '17 at 20:59
  • 1
    But i have 2 different api with different endpoints, with one it works proper, and with other it returns cors error – Affan Shaikh Jul 06 '17 at 21:11

0 Answers0