I\'m sending a request to an API, it returns an array of data, but I don\'t know how to extract the headers from that url, this is what i\'ve tried in my service
<
When you do .map(this.extractData)
the let body = res.json()
from this.extractData
function takes out everything from the response except the body
.
Instead if you do following, .map((res: Response) => res)
, that will return the whole response and you can access all the attributes and assign them to variables.
Here's a Plunker demo.