I am trying to call a Web Api endpoint from Angular 2. In IE and Chrome it all works fine but in Firefox I get a json parse error. I think its returning XML instead of Json. I thought that setting the content-type would have fixed this. Does my code look correct? Any ideas?
let _tileUrl = XXX;
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this._http.get(_tileUrl, options)
.map((response: Response) => <ITile[]>response.json())
.catch(this.handleError);