robercoding
07/19/2023, 6:29 AM"No transformation found: class ByteChannelJS -> class Fact
with response from <https://catfact.ninja/fact>:
status: 200 
response headers: 
cache-control: no-cache, private
, content-type: application/json"robercoding
07/19/2023, 6:30 AMval client = HttpClient(Js) {
    install(Resources)
    install(ContentNegotiation) {
        Json {
            prettyPrint = true
            isLenient = true
            ignoreUnknownKeys = true
        }
    }
}val fact: Fact = client.get("<https://catfact.ninja/fact>").body<Fact>()@Serializable
data class Fact(val fact: String)robercoding
07/19/2023, 6:32 AMJsonrobercoding
07/19/2023, 6:33 AMrobercoding
07/19/2023, 8:00 AMJsonval client = HttpClient(Js) {
    install(Resources)
    install(ContentNegotiation) {
        json(
            Json {
                prettyPrint = true
                isLenient = true
                ignoreUnknownKeys = true
            }
        )
    }
}Andromadus Naruto
07/19/2023, 11:51 AM