Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Need .Net calls to ReMap the hosts #1

RameshJhajharia opened this Issue · 8 comments

2 participants


Can you please provide .Net calls to ReMap the hosts ?
As we have REST API call "POST /proxy/[port]/hosts" but for this we don't have .net wrapped calls.
Can you please help me on this or guide me so I can do this?

@AdaTheDev AdaTheDev was assigned

Should be straight forward - new method to go in Client.cs taking a host and ip address. Currently having issues running WebDriver with FF 18 on my machine so need to resolve that before I can test the changes.


Thanks Adrian,

Waiting eagerly for new release as I tried but couldn't succeed.


Looks like this particular method in the REST API was not added until after the currently available built version of BrowserMob Proxy (Beta 6) - I get a 404. But sounds like building from source will bring that in, per!topic/browsermob-proxy/-yTDP_gaflo


RemapHost method added to Client.cs. Points to note:
1) you need to be running at least Beta 7 of BrowserMob proxy (current latest version at time of writing) - the pre-built version currently available is Beta 6 which does not include the REST API for remapping hosts, so you will currently need to build yourself.
2) whereas the examples I found gave example arguments of the nature "{something}.com", I found in testing this had no effect. Instead, giving the host as "www.{something}.com" worked

@AdaTheDev AdaTheDev closed this

I tried with new code but getting 404 . I am attaching snap shot of the issue also.
I used following call for this :
client.RemapHost("", "");

Please find attached snap shot for more details.
BrowserMob Exception


Per my last comment and the linked forum post, you need to make sure you have the latest BrowserMob Proxy code (which you'll need to build from source as the latest zip download via is Beta 6 version, whereby latest is Beta 7 - the Beta 6 did not have the REST API to remap hosts)


Thanks a lot.

Its working perfectly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.