How do I create a Firefox extension to intercept HTTP requests and responses?

How do I insert a listener into Firefox HTTP requests and responses so that I pop up in a window with the requested address and response body?

Note:

I have to do this by creating an extension for Firefox.
I need a button to activate or deactivate a feature.
For each request, I need a popup with an "Ok" button to allow the request. Likewise, I need to pop up a response body window from the web server with an OK button to allow the browser to display the content.

I know I need to use nsIHttpChannel as shown here , but I don't know where to put such code on the extension architecture .
I know very little about javascript.

Can anyone help me?

+2


a source to share


1 answer


It might help to have a look at the Firebug source code



http://code.google.com/p/fbug/

0


a source







All Articles