Get PostData as in FireBug

Someone help me how to get the headers and PostData inside the extension using xpcom / something else? I cannot find functions inside firebug because it is a big code base ... thank you guys

+3
source share
2 answers

I assume that you want the request headers, not the response headers. Then you register an observer for notification http-on-modify-request. General documentation https://developer.mozilla.org/en/Observer_Notifications#HTTP_requests , sample code can be found at https://developer.mozilla.org/en/Creating_Sandboxed_HTTP_Connections#Handling_cookies . Getting headers is easy, you just call nsIHttpChannel.getRequestHeader().

, http-on-examine-response , , http-on-examine-cached-response.

POST . httpChannel.QueryInterface(Components.interfaces.nsIUploadChannel).uploadStream. - , , . , , , - , nsIInputStreamTee, nsIPipe . , , Firebug.

0

All Articles