public interface ApacheHttpClientBuilder
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.http.impl.client.CloseableHttpClient |
build()
构建httpclient实例.
|
ApacheHttpClientBuilder |
httpProxyHost(String httpProxyHost)
代理服务器地址.
|
ApacheHttpClientBuilder |
httpProxyPassword(String httpProxyPassword)
代理服务器密码.
|
ApacheHttpClientBuilder |
httpProxyPort(int httpProxyPort)
代理服务器端口.
|
ApacheHttpClientBuilder |
httpProxyUsername(String httpProxyUsername)
代理服务器用户名.
|
ApacheHttpClientBuilder |
httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
重试策略.
|
ApacheHttpClientBuilder |
keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
超时时间.
|
ApacheHttpClientBuilder |
sslConnectionSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslConnectionSocketFactory)
ssl连接socket工厂.
|
ApacheHttpClientBuilder |
supportedProtocols(String[] supportedProtocols)
支持的TLS协议版本.
|
org.apache.http.impl.client.CloseableHttpClient build()
ApacheHttpClientBuilder httpProxyHost(String httpProxyHost)
httpProxyHost - 代理服务器地址ApacheHttpClientBuilder httpProxyPort(int httpProxyPort)
httpProxyPort - 代理服务器端口ApacheHttpClientBuilder httpProxyUsername(String httpProxyUsername)
httpProxyUsername - 代理服务器用户名ApacheHttpClientBuilder httpProxyPassword(String httpProxyPassword)
httpProxyPassword - 代理服务器密码ApacheHttpClientBuilder httpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler httpRequestRetryHandler)
httpRequestRetryHandler - 重试处理器ApacheHttpClientBuilder keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
keepAliveStrategy - 保持连接策略ApacheHttpClientBuilder sslConnectionSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslConnectionSocketFactory)
sslConnectionSocketFactory - SSL连接Socket工厂ApacheHttpClientBuilder supportedProtocols(String[] supportedProtocols)
supportedProtocols - 支持的协议版本数组Copyright © 2026. All rights reserved.