Skip to content

Commit

Permalink
fix(#79-support-search): add content-negotiation
Browse files Browse the repository at this point in the history
  • Loading branch information
y9Kap committed Oct 30, 2023
1 parent ca438ec commit 38b4494
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/api-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies {
commonMainImplementation(libs.ktorClientLogging)
commonMainImplementation(libs.ktorClientWebSockets)
commonMainImplementation(libs.rsocketKtorClient)
commonMainImplementation(libs.ktorClientContentNegotiation)

commonMainApi(projects.api)
commonMainImplementation(projects.types.serializable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down

0 comments on commit 38b4494

Please sign in to comment.