hi, sorry if this has been asked before but using ...
# ktor
j
hi, sorry if this has been asked before but using the ktor HttpClient and trying to receive an
HttpResponse
from a
<http://client.post|client.post><HttpResponse>(url) {}
it does not seem to throw any exceptions on 4xx or 5xx response codes. Is this the intended behavior? It doesn’t mention on the docs that the default response validator doesn’t fire in this scenario. If the type is switched from
HttpResponse
to
String
it throws the error
it appears if we do not call
response.readText()
the validators will not fire and no exception will be thrown.
this is in ktor
1.4
r
yes, it’s a bug and was fixed in 1.5.0
👍 1
j
upgrade fixed it, thanks