diff --git a/api/api-ktor/build.gradle.kts b/api/api-ktor/build.gradle.kts index e4a35a2..1b2fef2 100644 --- a/api/api-ktor/build.gradle.kts +++ b/api/api-ktor/build.gradle.kts @@ -12,6 +12,7 @@ dependencies { commonMainImplementation(libs.ktorClientWebSockets) commonMainImplementation(libs.rsocketKtorClient) commonMainImplementation(libs.ktorClientContentNegotiation) + commonMainImplementation(libs.ktorSerializationJson) commonMainApi(projects.api) commonMainImplementation(projects.types.serializable) 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 4c03597..6f942b8 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 @@ -26,6 +26,7 @@ import io.ktor.client.plugins.contentnegotiation.* import io.ktor.client.plugins.websocket.* import io.ktor.client.request.* import io.ktor.http.* +import io.ktor.serialization.kotlinx.json.* import io.ktor.utils.io.errors.* import io.rsocket.kotlin.ktor.client.RSocketSupport import kotlinx.coroutines.CancellationException @@ -42,17 +43,14 @@ public class KtorMeetacyEngine( } private val httpClient = httpClient.config { - expectSuccess = true install(WebSockets) install(RSocketSupport) install(ContentNegotiation) { - Json(json) { - ignoreUnknownKeys = true - } + json(json) } defaultRequest { - header(HttpHeaders.ContentType, ContentType.Application.Json.toString()) + header(HttpHeaders.ContentType, ContentType.Application.Json) } }