3

I am trying to make a JSONP call in Angular 2, but every time I am getting this error:

Refused to execute script from 'https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=xyz&state=987654421n&callback=ng_jsonp.__req0.finished' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Below is my angular code:

let header = new Headers({ 'Content-Type': 'application/json' });

return this.jsonp.get('https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=xyz&state=987654421&callback=JSONP_CALLBACK', {
     headers: header
}).map(response => <string[]> response.json()[1]);
wieczorek1990
  • 7,403
  • 1
  • 25
  • 19
Dheeraj Agrawal
  • 2,347
  • 11
  • 46
  • 63

0 Answers0