请帮助获取使用 Devtools 网络拦截的请求的响应正文(作为 json)。下面是我可以尝试的代码。谢谢!
devTools.addListener(Network.requestWillBeSent(),
entry -> {
Request req;
RequestId rid=entry.getRequestId();
if (entry.getRequest().getUrl().contains("tender")) {
req=entry.getRequest();
}
try {
br.write("Request URI : " + entry.getRequest().getUrl()+"\n With method : "+entry.getRequest().getMethod() + "\n");
} catch (IOException e) {e.printStackTrace();}
Command <ResponseBody> resBody=Network.getResponseBody(rid);
});