Why can't I access ALL headers in Angular2 from the response?
I have a legacy webservice which I can't modify. It sends some i,mportant information back to the client in the Response headers. Don't ask me why. this is crap.
my code is this:
.subscribe((r: Response) => {
var customHeader = r.headers.get("Database-Deleted");
var allHeadersAsString = JSON.stringify(r.headers);
but seems the response contains only a few headers, not all of them.
Can someone tell me this is by design and there is no way to access them? (or even better: tell me how to make it work)
UPDATE
Thanks top the comments I was able to identify it as a CORS issue. The accepted answers of other questions did not give me the right clue.
THANKS!