StreamableHttpServerTransport

Parameters

configuration

Transport configuration. See Configuration for available options.


constructor()(source)

Deprecated

Use default constructor with explicit Configuration()


constructor(enableJsonResponse: Boolean = false, enableDnsRebindingProtection: Boolean = false, allowedHosts: List<String>? = null, allowedOrigins: List<String>? = null, eventStore: EventStore? = null, retryIntervalMillis: Long? = null)(source)

Deprecated

Use constructor with Configuration: StreamableHttpServerTransport(Configuration(enableJsonResponse = ...))

Replace with

StreamableHttpServerTransport(Configuration(enableJsonResponse = enableJsonResponse, enableDnsRebindingProtection = enableDnsRebindingProtection, allowedHosts = allowedHosts, allowedOrigins = allowedOrigins, eventStore = eventStore, retryIntervalMillis = retryIntervalMillis))

Secondary constructor for StreamableHttpServerTransport that simplifies initialization by directly taking the configurable parameters without requiring a Configuration instance.

Parameters

enableJsonResponse

Determines whether the server should return JSON responses. Defaults to false.

enableDnsRebindingProtection

Enables DNS rebinding protection. Defaults to false.

allowedHosts

A list of hosts allowed for server communication. Defaults to null, allowing all hosts.

allowedOrigins

A list of allowed origins for CORS (Cross-Origin Resource Sharing). Defaults to null, allowing all origins.

eventStore

The EventStore instance for handling resumable events. Defaults to null, disabling resumability.

retryIntervalMillis

Retry interval in milliseconds for event handling or reconnection attempts. Defaults to null.