I am trying to use BrowserMob proxy library (net.lightbody.bmp) to intercept http requests from some default website (for instance: "https://default.com") and my question is how to do that ?
BrowserMobProxy proxy = new BrowserMobProxyServer();
proxy.start(9091, InetAddress.getByName("127.0.0.1"), InetAddress.getByName("default.com"));
and after that I create anonymous class for filtering request
proxy.addRequestFilter(new RequestFilter() {
@Override
public HttpResponse filterRequest(HttpRequest request, HttpMessageContents contents, HttpMessageInfo messageInfo) {}...
but nothing happens.