I am doing signup with linkedin and need to fetch access code and basic profile details. But when I post the request, I am getting CORS error in my console, when I hit the URL d
EDIT :
You need not require to map
your response object from http.get()
. It is automatically done by new angular6 http
.
So it should be this way :
this.http.get(authURL).subscribe((res:any)=> {console.log("Http Get " + res); });
Original answer related to CORS
:
As suggested in that answer, try to invoke linkedIn api
from your backend api and not from the browser directly. This will solve your Cross origin
related problem.
Linkedin
will directly not allow any third application to execute its api
. It has to be from your backend api
itself and not the browser.