响应头,我试图用HTTP单元读取响应头为我的应用 -阅读使用的HtmlUnit
WebClient webClient = new WebClient();
WebClient.setThrowExceptionOnScriptError(false);
HtmlPage currentPage = webClient.getPage("http://myapp.com");
WebResponse response = currentPage.getWebResponse();
System.out.println(response.getResponseHeaders());
我能看到的响应头,但它们仅限于第一HTTP GET请求。 当我使用LiveHTTPHeaders插件的Firefox插件时,我得到了所有的获取请求和相应的标题响应。
有没有什么办法让所有后续请求的http头不受限制只是第一次得到?
我在使用Selenium使用捕捉N/W流量结束了。 – Tarun 2012-02-06 10:22:28
我不知道为什么我得到了这个downvote ... – 2012-06-21 15:30:16
我没有downvote – Tarun 2012-06-22 04:27:01