It prints `kotlin.TypeCastException` when I create...
# ktor
r
It prints
kotlin.TypeCastException
when I create an
HttpClient
using this on iOS
Copy code
object HttpCliiFactory {

    fun create(
        config: HttpClientConfig<*>.() -> Unit = {},
        serializer: KotlinxSerializer.() -> Unit = {}
    ) =
        HttpClient {
            expectSuccess = false
            install(MyLoggingFeature)
            install(ExpectSuccess)
            install(JsonFeature) {
                this.serializer = KotlinxSerializer(Json.nonstrict).apply(serializer)
            }
            config()
        }

}
👀 1
Note that it works after that, it just prints that.
@e5l I just confirmed that it comes from
install(MyLoggingFeature)