alon shoshani.86
12/27/2021, 7:37 PMio.ktor.client.HttpClient
To make http calls between microservices and third parties for example:
When the http call succeeded the httpResponse maps automatically to my Object,
but when there is error in the http call and it failed, I expect the client will throw an exception with the satatus code 40X 50X, and it's not.
I need to check manually what is the status code, and decide what to do.
Am I using it wrong? Do you have another client to use?Kanu
12/27/2021, 8:43 PMLucas Milotich
12/27/2021, 8:45 PMexpectSuccess
property in the client creation :
https://ktor.io/docs/response-validation.html#defaultalon shoshani.86
12/28/2021, 7:12 AMLucas Milotich
12/29/2021, 8:02 PM