On 3/18/10 1:00 PM, Rémi wrote:
In a Firefox Add-on, I would like to intercept requests sent by the
browser, change the URI and then to send the request.

There is no reasonably way to do this at the moment... Though it seems to me like a proxy might go a long ways here.

To do that I interecpt the requests thanks to the Observer service. I destroy 
the
current request object, and make a new one with the new URI, then I send
it using the asyncOpen method.

This pretty much fails for POST requests, right?

This is working, but the problem is that the new request is sent, but
the data is not displayed in the browser.

Are you pumping the data you get into the original request's observer?

Does the display functionality have to be implemented in the listener object 
passed to asyncOpen (maybe
in the onDataAvailable method?) ?

Yes.

-Boris
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to