public static final class HttpSettings.HttpSettingsBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
HttpSettings |
build()
Builds and returns a new HttpSettings instance with the configured settings.
|
HttpSettings.HttpSettingsBuilder |
withConnectTimeout(Duration connectTimeout)
Sets the connection timeout duration.
|
HttpSettings.HttpSettingsBuilder |
withKeepAliveDuration(Duration keepAliveDuration)
Sets the keep-alive duration for idle connections.
|
HttpSettings.HttpSettingsBuilder |
withMaxIdleConnections(int maxIdleConnections)
Sets the maximum number of idle connections to keep in the connection pool.
|
HttpSettings.HttpSettingsBuilder |
withProxyConfig(ProxyConfig proxyConfig)
Sets the proxy configuration.
|
HttpSettings.HttpSettingsBuilder |
withReadTimeout(Duration readTimeout)
Sets the read timeout duration.
|
public HttpSettings.HttpSettingsBuilder withConnectTimeout(Duration connectTimeout)
The connection timeout is the maximum time to wait when establishing a connection to the server before giving up.
connectTimeout - The connection timeout durationpublic HttpSettings.HttpSettingsBuilder withReadTimeout(Duration readTimeout)
The read timeout is the maximum time to wait for data to be available for reading from an established connection before giving up.
readTimeout - The read timeout durationpublic HttpSettings.HttpSettingsBuilder withMaxIdleConnections(int maxIdleConnections)
maxIdleConnections - The maximum number of idle connectionspublic HttpSettings.HttpSettingsBuilder withKeepAliveDuration(Duration keepAliveDuration)
Connections that have been idle for longer than this duration will be closed.
keepAliveDuration - The keep-alive durationpublic HttpSettings.HttpSettingsBuilder withProxyConfig(ProxyConfig proxyConfig)
proxyConfig - The proxy configuration or null for no proxypublic HttpSettings build()
Copyright © 2026 Alibaba Cloud Computing. All rights reserved.