/**
* Allows you do override the HTTP Client used to execute the requests.
* By default, it used a custom client without cookies.
*
* @return the HTTP Client instance
*/
protected HttpClient newHttpClient() {
return HttpClients.custom()
// Do not manage redirection.
.setRedirectStrategy(new DefaultRedirectStrategy() {
@Override
protected boolean isRedirectable(String method) {
return followRedirect(method);
}
})
.setDefaultCookieStore(new BasicCookieStore() {
@Override
public synchronized List<Cookie> getCookies() {
return Collections.emptyList();
}
})
.build();
}
ProxyFilter.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:wisdom
作者:
评论列表
文章目录