https://kotlinlang.org logo
#ktor
Title
# ktor
o

Orhan Tozan

08/28/2020, 11:52 AM
Why is the ktor client always appending
application/json
to the Accept request header? This code
Copy code
accept(ContentType.Any)
Update: adding:
Copy code
HttpClient(Android) {
    install(JsonFeature) {
        serializer = KotlinxSerializer(Json {
            ignoreUnknownKeys = true
        })
        accept(ContentType.Any)
    }
}
only makes it worse😂:
2 Views