类 HttpTransportConfig.Builder
java.lang.Object
io.agentscope.core.model.transport.HttpTransportConfig.Builder
- 封闭类:
HttpTransportConfig
Builder for HttpTransportConfig.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Build the HttpTransportConfig.connectTimeout(Duration connectTimeout) Set the connect timeout.httpVersion(HttpVersion httpVersion) Set the HTTP version to use.ignoreSsl(boolean ignoreSsl) Set whether to ignore SSL certificate verification.keepAliveDuration(Duration keepAliveDuration) Set the keep-alive duration for idle connections.maxIdleConnections(int maxIdleConnections) Set the maximum number of idle connections in the pool.proxy(ProxyConfig proxyConfig) Set the proxy configuration.readTimeout(Duration readTimeout) Set the read timeout.writeTimeout(Duration writeTimeout) Set the write timeout.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
connectTimeout
Set the connect timeout.- 参数:
connectTimeout- the connect timeout duration- 返回:
- this builder
-
readTimeout
Set the read timeout.- 参数:
readTimeout- the read timeout duration- 返回:
- this builder
-
writeTimeout
Set the write timeout.- 参数:
writeTimeout- the write timeout duration- 返回:
- this builder
-
maxIdleConnections
Set the maximum number of idle connections in the pool.- 参数:
maxIdleConnections- the max idle connections- 返回:
- this builder
-
keepAliveDuration
Set the keep-alive duration for idle connections.- 参数:
keepAliveDuration- the keep-alive duration- 返回:
- this builder
-
ignoreSsl
Set whether to ignore SSL certificate verification.Warning: Setting this to true disables SSL certificate verification, which makes the connection vulnerable to man-in-the-middle attacks. This should only be used for testing or with trusted self-signed certificates.
- 参数:
ignoreSsl- true to ignore SSL certificate verification, false otherwise- 返回:
- this builder
-
proxy
Set the proxy configuration.Supports HTTP and SOCKS proxies. See
ProxyConfigfor details.- 参数:
proxyConfig- the proxy configuration- 返回:
- this builder
-
httpVersion
Set the HTTP version to use.- 参数:
httpVersion- the HTTP version- 返回:
- this builder
-
build
Build the HttpTransportConfig.- 返回:
- a new HttpTransportConfig instance
-