I am using HttpClient
in Angular. The documentation says:
All HttpClient methods return an RxJS Observable of something...HttpClient.get returns the body of the response as an untyped JSON object by default
Does this mean that in the following code, res
is the HTTP message body (excluding the headers)?
this.http.post('http://localhost:8083', body, options)
.map((res) => { res.json(); console.log('got response'); })
How could I get the HTTP headers if I want to see that a certain header is present in the server's response?