Modifying HTTP requests

49 views
Skip to first unread message

Ben Campbell

unread,
May 29, 2013, 12:41:31 AM5/29/13
to mozilla-la...@googlegroups.com
With the addon sdk is there any way to hook into the general HTTP
request system?
I'd like to write an extension that examines and modifies requests - eg
to change the URL or user-agent string for certain requests, say.

Thanks,
Ben.

Erik Vold

unread,
Jun 4, 2013, 6:44:03 PM6/4/13
to mozilla-labs-jetpack
I haven't tried this yet, tho I want to! :)

Check out the 'http-on-modify-request' event and related events, documentation at https://developer.mozilla.org/en-US/docs/Observer_Notifications#HTTP_requests

This would make a pretty sweet module!

Erik



--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jetpack+unsub...@googlegroups.com.
To post to this group, send email to mozilla-labs-jetpack@googlegroups.com.
Visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.



backy0175

unread,
Jun 5, 2013, 2:28:21 AM6/5/13
to mozilla-la...@googlegroups.com, ben...@googlemail.com
You can get information and sample from

backy0175

Geek in Training

unread,
Jun 13, 2013, 11:14:38 PM6/13/13
to mozilla-la...@googlegroups.com
I have implemented this into my addon, but not as a separate module.  I will look into doing that soon.

On Tuesday, June 4, 2013 3:44:03 PM UTC-7, Erik Vold wrote:
I haven't tried this yet, tho I want to! :)

Check out the 'http-on-modify-request' event and related events, documentation at https://developer.mozilla.org/en-US/docs/Observer_Notifications#HTTP_requests

This would make a pretty sweet module!

Erik

On Tue, May 28, 2013 at 9:41 PM, Ben Campbell <ben...@googlemail.com> wrote:
With the addon sdk is there any way to hook into the general HTTP request system?
I'd like to write an extension that examines and modifies requests - eg to change the URL or user-agent string for certain requests, say.

Thanks,
Ben.


--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jetpack+unsubscrib...@googlegroups.com.
To post to this group, send email to mozilla-la...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages