webmetrics / browsermob-proxy

NOTICE: this project has been forked and is being maintained at https://github.com/lightbody/browsermob-proxy
https://github.com/lightbody/browsermob-proxy
Apache License 2.0
234 stars 773 forks source link

Custom request headers #17

Closed davbo closed 12 years ago

davbo commented 12 years ago

Hey chaps,

I've added an API endpoint to /port/headers which accepts a bunch of params and places those params into the request headers (overriding any with the same names). I know in the docs you say about posting javascript to manipulate the requests but I wasn't sure how to make a start with that (embedding Rhino perhaps?)

Anyways, I had an itch to set some custom HTTP Request headers, this is me attempting to scratch it :-)

ps. Strictly speaking I'm not a Java dev so the code might be a little sketchy.

lightbody commented 12 years ago

This looks good. Before I merge it in, can you add some documentation to the readme as well?

davbo commented 12 years ago

Sure I'll write tomorrow morning, when I'm not in a pub :-)

Thanks for merging the other fix. On Oct 31, 2011 7:47 PM, "Patrick Lightbody" < reply@reply.github.com> wrote:

This looks good. Before I merge it in, can you add some documentation to the readme as well?

Reply to this email directly or view it on GitHub: https://github.com/webmetrics/browsermob-proxy/pull/17#issuecomment-2582218

davbo commented 12 years ago

Added some docs.

There are a couple of problems I've noticed with the current implementation: