0

I want to access request headers (NOT response headers) after a request to the server, how do I do it?

I'm currently using angular, but open to Javascript solutions. The response only gives response headers.

Mac_W
  • 2,927
  • 6
  • 17
  • 30
  • possible duplicate of https://stackoverflow.com/questions/49043652/how-can-i-get-http-request-headers-in-angular-4 – prabhat gundepalli Sep 21 '18 at 15:33
  • Mine is specific about getting headers after a failed request, that one is general so they are not duplicates. Mine as well accepts pure JS responses. – Mac_W Sep 21 '18 at 15:37
  • As below answer describes, it is not possible to read the requestHeaders from Angular's http modules but you can send a separate ajax call request and read headers from that request. https://stackoverflow.com/questions/10515862/js-jquery-get-httprequest-request-headers – Learning Sep 21 '18 at 18:46
  • @Shahana - you are not exactly right. I've managed to do it, In the next following days I'll answer my own question to prove it – Mac_W Sep 22 '18 at 19:16

0 Answers0