Thanks for your response.

Le 24/03/2010 06:47, Boris Zbarsky a écrit :
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?

Yes, you are right but I am concentrating on making it work for GET requests before I do that for POST requests.


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?


No I do not, how can I do that?

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

Yes.

How can I implement this functionality? Can you provide me with some code or give me links?


-Boris

Thanks,

Rémi

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

Reply via email to