类 WebSocketRequest
java.lang.Object
io.agentscope.core.model.transport.websocket.WebSocketRequest
WebSocket connection request configuration.
Usage example:
WebSocketRequest request = WebSocketRequest.builder("wss://api.openai.com/v1/realtime")
.header("Authorization", "Bearer " + apiKey)
.header("OpenAI-Beta", "realtime=v1")
.connectTimeout(Duration.ofSeconds(30))
.build();
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明static WebSocketRequest.BuilderCreate a new builder with the specified URL.Get the connection timeout.Get the request headers.getUrl()Get the WebSocket URL.
-
方法详细资料
-
getUrl
Get the WebSocket URL.- 返回:
- WebSocket URL
-
getHeaders
Get the request headers.- 返回:
- Request headers (immutable)
-
getConnectTimeout
Get the connection timeout.- 返回:
- Connection timeout
-
builder
Create a new builder with the specified URL.- 参数:
url- WebSocket URL- 返回:
- Builder instance
-