2、HttpClient修改处理策略Strategy
HttpClient提供了很多接口,让我们能自定义处理逻辑,这些接口可以在AbstractHttpClient中找到:
setAuthSchemes(AuthSchemeRegistry);
setConnectionBackoffStrategy(ConnectionBackoffStrategy);
setReuseStrategy(ConnectionReuseStrategy);
setKeepAliveStrategy(ConnectionKeepAliveStrategy);
setHttpRequestRetryHandler(HttpRequestRetryHandler);
setRedirectHandler(RedirectHandler);
setRedirectStrategy(RedirectStrategy);
setTargetAuthenticationHandler(AuthenticationHandler);
setTargetAuthenticationStrategy(AuthenticationStrategy);
setProxyAuthenticationHandler(AuthenticationHandler);
setProxyAuthenticationStrategy(AuthenticationStrategy);
setUserTokenHandler(UserTokenHandler);
posted on 2013-08-04 15:13 angelshelter 阅读(1585) 评论(0) 编辑 收藏 举报