StreamableHttpClientTransport class
Properties
-
baseUrl
→ String
-
Get the base URL
no setter
-
config
→ StreamableHttpTransportConfig
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
The last failure from
StreamableHttpTransportConfig.headersProvider.
getter/setter pair
-
maxConcurrentRequests
→ int
-
Get the maximum concurrent requests
no setter
-
oauth
→ McpOAuth?
-
The authorization this transport uses, if any.
no setter
-
onClose
→ Future<void>
-
Future that completes when the transport is closed
no setteroverride
-
onMessage
→ Stream
-
Stream of incoming messages
no setteroverride
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessionId
→ String?
-
Get the current session ID
no setter
-
useHttp2
→ bool
-
Check if HTTP/2 is enabled
no setter
Methods
-
abortRequest(Object id)
→ void
-
Close the HTTP exchange of request
id (2026-07-28: closing the
request's stream is how a client cancels it on Streamable HTTP).
-
close()
→ void
-
Close the transport
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
send(dynamic message)
→ void
-
Send a JSON-RPC message
override
-
setProtocolVersion(String? version)
→ void
-
Spec 2025-06-18+: record the negotiated MCP protocol version so
every post-handshake HTTP request carries
MCP-Protocol-Version: <version>.
-
toString()
→ String
-
A string representation of this object.
inherited
Constants
-
Message key (transport-internal, never sent): extra HTTP headers for
this message, such as
Mcp-Param-* (2026-07-28).