From 782b525f270890b6da765f1e7678a7e86c7b4801 Mon Sep 17 00:00:00 2001 From: Vaibhav Raj <68665948+dead8309@users.noreply.github.com> Date: Tue, 13 May 2025 19:06:41 +0530 Subject: [PATCH] nit: apply `requestBuilder` headers when rpc messages (#96) fixes: #63 Co-authored-by: Leonid Stashevsky --- .../modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt b/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt index 19405c5..335e9a6 100644 --- a/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt +++ b/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt @@ -113,6 +113,7 @@ public class SseClientTransport( try { val response = client.post(endpoint.getCompleted()) { + requestBuilder() headers.append(HttpHeaders.ContentType, ContentType.Application.Json) setBody(McpJson.encodeToString(message)) }