``` private val client by lazy { HttpCl...
# ktor
n
Copy code
private val client by lazy {
        HttpClient(engine) {
            install(JsonFeature) {
                serializer = KotlinxSerializer(Json.nonstrict).apply {
                    setMapper(Todo::class, Todo.serializer())
                }
            }
            install(WebSockets)
        }
    }

    suspend fun fetchNotes(): List<Todo> {
        val jsonString2 = client.get<String> {
            url("$baseUrl/todos")
            
        }
        return Json.nonstrict.parse(multiNoteSerializer, jsonString2)
    }
c
This is only available at JVM
n
Ahh so not possible at all.
c
Not all engines support it at all
n
would it be possible then using the Android “OkHttpEngine”?
c
Yes, but you need to configure okhttp client with
config
block
Copy code
HttpClient(OkHttp) {
    engine {
        config {
            pingInterval(...)
        }
    }
}