Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Need .Net calls to ReMap the hosts #1

Closed
RameshJhajharia opened this Issue · 8 comments

2 participants

@RameshJhajharia

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
@AdaTheDev
Collaborator

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.

@RameshJhajharia

Thanks Adrian,

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

@RameshJhajharia
@AdaTheDev
Collaborator

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 https://groups.google.com/forum/?fromgroups=#!topic/browsermob-proxy/-yTDP_gaflo

@AdaTheDev
Collaborator

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
@RameshJhajharia

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("www.test.com", "127.0.0.1");

Please find attached snap shot for more details.
BrowserMob Exception

@AdaTheDev
Collaborator

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 http://opensource.webmetrics.com/browsermob-proxy/ is Beta 6 version, whereby latest is Beta 7 - the Beta 6 did not have the REST API to remap hosts)

@RameshJhajharia

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.