I'm trying to get the response headers from a post request, but the HttpResponse object doesn't contain the same headers that I can see in the network. What am I doing wrong? I need to access the value of the Apiproxy-Session-Id key and it isn't present in the HttpHeaders.
This is my code to execute the post request and log the full response, where http is an HttpClient object.
this.http.post('http://localhost:8081/user/login',
JSON.stringify(requestBody), {observe: 'response'}).subscribe(resp => {
console.log(resp);
});
This is the response I'm logging.
These are the headers I'm seeing in the network.
I'm new to Angular and very stumped by this. Thanks for your help!