StreamableHttp
data class StreamableHttp(val url: String, val headers: Map<String, String> = emptyMap(), val connectTimeout: Duration = 5.seconds, val requestTimeout: Duration = 5.minutes, val allowInsecureHttp: Boolean = false) : McpTransportConfig
Streamable HTTP settings supported by both JVM and Android MCP clients.
HTTPS is allowed by default. An http endpoint requires allowInsecureHttp to be explicitly enabled on every platform. Android 9 / API 28 and newer normally block cleartext traffic as well, so the application must configure networkSecurityConfig or usesCleartextTraffic itself. A library cannot override that operating-system policy.
构造函数(Constructors)
类型
属性(Properties)
函数
Link copied to clipboard
返回值 `connectTimeout` 以毫秒为单位(即整个时间值以毫秒为单位表示)。Java 无法读取这个数据。 `connectTimeout`.
Link copied to clipboard
返回值 requestTimeout 以毫秒为单位(即整个时间值以毫秒为单位表示)。Java 无法读取这个数据。 requestTimeout.
Link copied to clipboard
返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。