Clarification for possible duplicate: The question was intended to ask how to observe the full response and return the body; not "how to read the headers"
I'm learning Angular and have gone through the Tour of Heroes tutorial.
I'm looking to modify the code below to get the full response so I can get links out of the header and then still return Hero[].
/** GET heroes from the server */
getHeroes (): Observable<Hero[]> {
return this.http.get<Hero[]>(this.heroesUrl)
.pipe(
tap(heroes => this.log(`fetched heroes`)),
catchError(this.handleError('getHeroes', []))
);
}