Hi.. when using `OKHttp logging format`, i am gett...
# ktor
s
Hi.. when using
OKHttp logging format
, i am getting
No suitable converter found for TypeInfo
, Has anyone seen this before?
Copy code
install(Logging) {
  level = LogLevel.ALL
  logger =...
  format = LoggingFormat.OkHttp
}
Copy code
io.ktor.serialization.ContentConvertException: No suitable converter found for TypeInfo(kotlin.collections.List<dev.suresh.http.Image>)
        at app//io.ktor.serialization.ContentConverterKt.deserialize(ContentConverter.kt:119)
        at app//io.ktor.client.plugins.contentnegotiation.ContentNegotiationKt.ContentNegotiation$lambda$16$convertResponse(ContentNegotiation.kt:281)
        at app//io.ktor.client.plugins.contentnegotiation.ContentNegotiationKt.access$ContentNegotiation$lambda$16$convertResponse(ContentNegotiation.kt:1)
        at app//io.ktor.client.plugins.contentnegotiation.ContentNegotiationKt$ContentNegotiation$2$2.invokeSuspend(ContentNegotiation.kt:296)
        at app//io.ktor.client.plugins.contentnegotiation.ContentNegotiationKt$ContentNegotiation$2$2.invoke(ContentNegotiation.kt)
        at app//io.ktor.client.plugins.contentnegotiation.ContentNegotiationKt$ContentNegotiation$2$2.invoke(ContentNegotiation.kt)
        at app//io.ktor.client.plugins.api.TransformResponseBodyHook$install$1.invokeSuspend(KtorCallContexts.kt:113)
        at app//io.ktor.client.plugins.api.TransformResponseBodyHook$insta
Seems like OKHttp format consumes the whole body, but not happening on default format.
a
The OkHttp format should leave an original body unchanged and consume only a copy of the body. Can you please share a code snippet to reproduce the problem?