I am trying to call a WebAPI using Angular but running into a credential not authorized issue. It works fine in IE but in Chrome and FF (401 unauthorized), the credentials are not forwarded.
I think the solution is to add the default credential into the call in Angular, but I am not sure how to do it or maybe there is some other solution.
Angular calls
import {Http} from 'angular2/http';
import {Injectable} from 'angular2/core';
import 'rxjs/Rx';
@Injectable()
export class MyListService{
constructor(private _http: Http) { }
getMyList() {
//return an observable
return this._http.get('http:////localhost:2311/api/MyListApi')
.map((response) => {
return response.json();
});
//.retry(3);
}
}