Angular -cli 6 using HttpClient and HttpHeaders.
My code is as follows:
public getData(params: any): Observable<any> {
let httpHeaders = new HttpHeaders({'Authorization': 'Bearer xxx'});
httpHeaders.append('x-auth-token', '');
return this.http.get('host', {headers: httpHeaders})
.pipe(
map(response => {
return response;
})
);
}
How do I access the X-Auth-Token from a response header? In the developer tool, I see
X-Auth-Token: 23e0bef4-8c77-4554-ad1a-1ec4ae134f86
I did see the mentioned possible duplicate question but making the proposed changes
'observe': 'response',
'x-auth-token': ''
I still fail to see the response headers.