Monday, May 20, 2024
9
rated 0 times [  10] [ 1]  / answers: 1 / hits: 17533  / 13 Years ago, tue, september 27, 2011, 12:00:00

Trying to get the Request headers from the XHR object, but with no luck, is there a hidden method or property of that object that will expose the headers sent by the browser?



I already know how to set custom request headers and view the response headers, I'm looking to get a list of all REQUEST headers sent, ones created by the browser and my custom ones.



I'm using webkit/chrome, don't care about other browsers.



EDIT: I'm not looking to monitor the request, I'm building a web app and I need to list those headers and display them within the app, please don't tell me about fiddler, firebug and chrome tools, that's not what I'm looking for.


More From » google-chrome

 Answers
7

There is no method in the XMLHttpRequest API to get the sent request headers. There are methods to get the response headers only, and set request headers.



You'll have to either have the server echo the headers, or use a packet sniffer like Wireshark.


[#89903] Monday, September 26, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
everett

Total Points: 317
Total Questions: 112
Total Answers: 109

Location: Philippines
Member since Sat, Jul 11, 2020
4 Years ago
;