diff --git a/api/api-ktor/build.gradle.kts b/api/api-ktor/build.gradle.kts index 5b09f734..e4a35a28 100644 --- a/api/api-ktor/build.gradle.kts +++ b/api/api-ktor/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { commonMainImplementation(libs.ktorClientLogging) commonMainImplementation(libs.ktorClientWebSockets) commonMainImplementation(libs.rsocketKtorClient) + commonMainImplementation(libs.ktorClientContentNegotiation) 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 f4073332..22ef33de 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 @@ -22,6 +22,7 @@ import app.meetacy.sdk.types.url.parametersOf import io.ktor.client.* import io.ktor.client.call.* import io.ktor.client.plugins.* +import io.ktor.client.plugins.contentnegotiation.* import io.ktor.client.plugins.websocket.* import io.ktor.utils.io.errors.* import io.rsocket.kotlin.ktor.client.RSocketSupport @@ -39,8 +40,13 @@ public class KtorMeetacyEngine( } private val httpClient = httpClient.config { - expectSuccess = true + install(ContentNegotiation) { + Json(json) { + ignoreUnknownKeys = true + } + } + expectSuccess = true install(WebSockets) install(RSocketSupport) }