From 732550c7cc7a9d033df1fca5fc0653047d15a138 Mon Sep 17 00:00:00 2001 From: Alex Sokol / y9san9 Date: Wed, 1 Nov 2023 09:54:06 +0300 Subject: [PATCH] fix: content-type now is not specified when making websocket connection --- .../kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt index ba6b903..82c4a6a 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt @@ -50,7 +50,9 @@ public class KtorMeetacyEngine( json(json) } defaultRequest { - header(HttpHeaders.ContentType, ContentType.Application.Json) + if (!url.protocol.isWebsocket()) { + header(HttpHeaders.ContentType, ContentType.Application.Json) + } } }