How to build Firefox extention to intercept HTTP requests and responses?

Posted by didizingo on Stack Overflow See other posts from Stack Overflow or by didizingo
Published on 2010-05-06T17:20:36Z Indexed on 2010/05/06 17:38 UTC
Read the original article Hit count: 182

Filed under:
|
|
|
|

Hi, how do I insert a listener to Firefox http requests and responses, so that I popup a window with the address requested and the response body?

Note:

I have to do this building an extension to Firefox.
I need a button to activate or disable the feature.
For every request, I need to popup a window with an "Ok" button to allow the request to be made. Likewise, I need to popup a window with the response body from the web server, with an "Ok" button to allow the content to be displayed by the browser.

I know that I have to use nsIHttpChannel, as shown here, but I don't know where to put such code on the extention's architecture.
I have very little knowledge about javascript.

Could anyone help me?

© Stack Overflow or respective owner

Related posts about firefox

Related posts about extension