For example:
wc = new WebClient(BrowserVersion.MOZILLA_1_0, '127.0.0.1', 8080)Strangely, there's not a way to set the proxy host and port after the client has been constructed (as far as I can tell), meaning you have to specify a browser version (which is just as well - you're mimicking a browser, why not fake the UserAgent as well?)
state = wc.webConnection.state
state.setProxyCredentials(AuthScope.ANY,
new UsernamePasswordCredentials('user','password))
No comments:
Post a Comment