Open 772451348 opened 4 years ago
这个两个match同时返回true会用不了
拦截请求自定义处理有个不方便的地方,就是只能有1对出现,见下方代码, 如果2个Response都要处理的话就会报错
pipeline.addLast(new FullResponseIntercept() {
@Override
public boolean match(HttpRequest httpRequest, HttpResponse httpResponse, HttpProxyInterceptPipeline pipeline) {
return true;
}
@Override
public void handelResponse(HttpRequest httpRequest, FullHttpResponse httpResponse, HttpProxyInterceptPipeline pipeline) {
//TODO
}
});
@luyuanwan 只会有一个Response呀,没懂你的意思。
参考:https://github.com/monkeyWie/proxyee/blob/master/src/test/java/com/github/monkeywie/proxyee/InterceptFullHttpProxyServer.java