2017-08-30 142 views

回答

1

我不知道你是否能與訪問代理服務器的配置做到這一點,但我敢肯定,你可以過濾請求是這樣的:

Har har = proxyServer.getHar(); 
try { 
    har.getLog().getEntries().removeIf(x-> !x.getRequest().getMethod().equals("POST")); 
    har.writeTo(new File("har.json")); 
} catch (IOException e) { 
    e.printStackTrace(); 
} 

這將創建一個名爲新文件「har.json 「只有郵政。

相關問題