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);

上一篇:php – 我如何与Coinbase的API进行交互?为什么总是失败?


下一篇:php – 为什么walletnotify发生三次?