Yoonho Aaron Kim
10/25/2024, 9:02 AMio.ktor.client.call.NoTransformationFoundException: Expected response body of the type 'class MyClass' but was 'class io.ktor.utils.io.SourceByteReadChannel'
Response header `ContentType: application/octet-stream`
Request header `Accept: application/json`
My ktor setup is here:
@Provides
@Singleton
fun provideHttpClient(): HttpClient {
return HttpClient(Android) {
install(ContentNegotiation) {
json(Json {
ignoreUnknownKeys = true
})
}
}
}
I am using Ktor 3.0.0
I tried to set "header("ContentType", "application/json")" but it doesn't work...
What can I do to solve this issue?Aleksei Tirman [JB]
10/25/2024, 10:59 AMMyClass
and the code where the request is made?