I am writing a firefox extension that intercepts the XMLHttpRequest before the page gets loaded in the browser. What I have found so far requires me to create a new instance of XMLHttpRequest.
Any advice on this? Any help will be greatly appreciated!
Override the prototype of the XHR object, eg: