We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98995ec commit cbb64bbCopy full SHA for cbb64bb
src/jvmTest/kotlin/client/SseTransportTest.kt
@@ -119,4 +119,31 @@ class SseTransportTest : BaseTransportTest() {
119
testClientRead(client)
120
server.stop()
121
}
122
+
123
+ @Test
124
+ fun `test sse path not root path`() = runTest {
125
+ val server = embeddedServer(CIO, port = PORT) {
126
+ install(io.ktor.server.sse.SSE)
127
+ routing {
128
+ mcpSseTransport(path = "/sse", incomingPath = "/messages") {
129
+ onMessage = {
130
+ send(it)
131
+ }
132
133
134
+ }.start(wait = false)
135
136
+ val client = HttpClient {
137
+ install(SSE)
138
+ }.mcpSseTransport {
139
+ url {
140
+ host = "localhost"
141
+ port = PORT
142
+ pathSegments = listOf("sse")
143
144
145
146
+ testClientRead(client)
147
+ server.stop()
148
149
0 commit comments