如何使用Fiddler Debug HtmlUnit

Fiddler is an HTTP Proxy running on port 8888 on your local PC. Can configure any application which accepts a HTTP Proxy to run through Fiddler so you can debug its traffic." (hookup) Try it:

WebClient wc = new WebClient(BrowserVersion.FIREFOX_2, "127.0.0.1", 8888);
OR

Get the correct auto-configuration URL from Fiddler by clicking Tools / Fiddler Options / Connections, and clicking the 'Copy Browser Proxy Configuration URL' link."

wc.getProxyConfig().setProxyAutoConfigUrl(strUrl);

你可能感兴趣的:(htmlunit)