Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uphttp Response headers incomplete ? #13226
Comments
|
Can u send the same request using plain xhr and compare results? See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers |
Result: XMLHttpRequest().getAllResponseHeaders() Content-Type: application/json; charset=utf-8 But why ??? |
|
Oh, I found problem: it's CORS. |
|
Thanks for you question - it's helped me to find answer. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ... (check one with "x")
Current behavior
If I get Response from http request, response.headers contain only "application/json; charset=utf-8"
Expected behavior
Expected: get list all headers from http response
Minimal reproduction of the problem with instructions
I create link with REST response there: http://www.mocky.io/v2/5843ecc6100000da1c1a5734
(with added headers "Access-Control-Allow-Origin: *" and "Errors: error message")
and create test
Plunker link: http://plnkr.co/edit/vJD4Zuo0MxKAdb4nA1Xl?p=preview
What is the motivation / use case for changing the behavior?
parsing response headers from backend application
Please tell us about your environment:
Win10 64bit, npm 4.0.3
Language: [TypeScript 2.0.10]
Node (for AoT issues):
node --version= 7.2.0