2017-08-30 140 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 “只有邮政。

相关问题