import {Http, Response, Headers} from '@angular/http';
getHeroes (): Observable<Heros[]> {
return this.http.get(this.heroesUrl, {withCredentials: true}
)
.map(this.extractData)
.catch(this.handleError);
}
Don't get where the headers comes in and how.
var myHeaders = new Headers();
myHeaders.append('Access-Control-Allow-Origin', '*')
How they are combined?