类 WebSocketRequest.Builder
java.lang.Object
io.agentscope.core.model.transport.websocket.WebSocketRequest.Builder
- 封闭类:
WebSocketRequest
Builder for WebSocketRequest.
-
方法概要
修饰符和类型方法说明build()Build the WebSocketRequest.connectTimeout(Duration timeout) Set the connection timeout.Add a header.Add multiple headers.
-
方法详细资料
-
header
Add a header.- 参数:
name- Header namevalue- Header value- 返回:
- this builder
-
headers
Add multiple headers.- 参数:
headers- Headers to add- 返回:
- this builder
-
connectTimeout
Set the connection timeout.- 参数:
timeout- Connection timeout- 返回:
- this builder
-
build
Build the WebSocketRequest.- 返回:
- WebSocketRequest instance
-