響應頭,我試圖用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