Here is my service
executeProcess(): Observable<any> {
return this._httpClient.post(this.baseUrl + '/api/survey/process/execute', {}, { observe: 'response', responseType: 'text' as 'text' });
}
And in my component I am calling it like this
this._httpService.executeProcess().subscribe(res => {
console.log(res);
}
And this is my res.headers
{
"normalizedNames": {},
"lazyUpdate": null,
"headers": {}
}
which has a headers object which is empty. In the backend of this api, I am sending a header called location
which is being shown in the network tab of Chrome. Everything is working through chrome's network tab, but in angular, I am unable to retrieve this header.