Please help to get the response body(as json) for an intercepted request using Devtools Network. Below is the code I could attempt. Thanks!
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);
});