StreamableHttp

data class StreamableHttp(val url: String, val headers: Map<String, String> = emptyMap(), val timeout: Duration = Duration.ofSeconds(5), val readTimeout: Duration = Duration.ofMinutes(5)) : McpConnectionParameters

Parameters for establishing a MCP Streamable HTTP connection.

构造函数(Constructors)

Link copied to clipboard
constructor(url: String, headers: Map<String, String> = emptyMap(), timeout: Duration = Duration.ofSeconds(5), readTimeout: Duration = Duration.ofMinutes(5))

类型

Link copied to clipboard
class Builder

Fluent Builder for StreamableHttp该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard

需要包含在请求中的头部信息(headers)。

Link copied to clipboard

读取超时时间。

Link copied to clipboard

连接超时了。

Link copied to clipboard
val url: String

MCP 终点的完整 URL;其路径会保持原样使用(例如: https://host/tenant/service/mcp如果 URL 中没有路径部分,系统会自动回退到默认的页面或行为。 /mcp `endpoint.`

函数

Link copied to clipboard

返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。