public static class CommonsHttpClient.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CommonsHttpClient |
build()
Builds a new instance of CommonsHttpClient with the configured parameters.
|
CommonsHttpClient.Builder |
withConnectionManager(org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionManager) |
CommonsHttpClient.Builder |
withDatabricksConfig(DatabricksConfig databricksConfig) |
CommonsHttpClient.Builder |
withProxyConfig(ProxyConfig proxyConfig) |
CommonsHttpClient.Builder |
withRequestConfig(org.apache.http.client.config.RequestConfig requestConfig) |
CommonsHttpClient.Builder |
withRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler requestRetryHandler) |
CommonsHttpClient.Builder |
withSslSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslSocketFactory) |
CommonsHttpClient.Builder |
withTimeoutSeconds(int timeoutSeconds) |
public CommonsHttpClient.Builder withDatabricksConfig(DatabricksConfig databricksConfig)
databricksConfig - The DatabricksConfig to use for the HttpClient. If the
DatabricksConfig has an httpTimeoutSeconds set, it will be used as the default timeout
for the HttpClient.public CommonsHttpClient.Builder withTimeoutSeconds(int timeoutSeconds)
timeoutSeconds - The timeout in seconds to use for the HttpClient. This will override
any timeout set in the DatabricksConfig. Sets all three Apache HttpClient timeouts
(connect, socket, connection request) to the same value. For fine-grained control, use
withRequestConfig(RequestConfig) instead.public CommonsHttpClient.Builder withRequestConfig(org.apache.http.client.config.RequestConfig requestConfig)
requestConfig - The Apache RequestConfig to use for the HttpClient. When set,
this takes precedence over withTimeoutSeconds(int) and any timeout from DatabricksConfig.public CommonsHttpClient.Builder withProxyConfig(ProxyConfig proxyConfig)
proxyConfig - the proxy configuration to use for the HttpClient.public CommonsHttpClient.Builder withSslSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory sslSocketFactory)
sslSocketFactory - the SSLConnectionSocketFactory to use for the HttpClient.public CommonsHttpClient.Builder withConnectionManager(org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionManager)
connectionManager - the PoolingHttpClientConnectionManager to use for the HttpClient.public CommonsHttpClient.Builder withRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler requestRetryHandler)
requestRetryHandler - the HttpRequestRetryHandler to use for the HttpClient.Note: This API is experimental and may change or be removed in future releases without notice.
public CommonsHttpClient build()
Copyright © 2026. All rights reserved.