https://kotlinlang.org logo
#ktor
Title
# ktor
d

David Dupraz

07/11/2021, 12:56 PM
Hello. In a ClientRequestException, how to access to the text only ? For example, in
Client request(<http://localhost:2077/login>) invalid: 400 Bad Request. Text: "Wrong password"
printed by
exception.message
, is there a way to print only "Wrong password" ?
d

diesieben07

07/11/2021, 12:59 PM
exception.response.readText()
👌 1
d

David Dupraz

07/11/2021, 1:41 PM
Thank you 🙂