Is there a reason ktor clients don't return one of...
# ktor
c
Is there a reason ktor clients don't return one of the companion objects for
HttpStatusCode
? It seems like the code just constructs a new one one that matches the status
Int
. I found this odd when I did a
when
switch on the status from
HttpResponse
and the status did not match
HttpStatusCode.OK
.
e
Hi @codyoss. The
description
field depends on real server response status line: some APIs transfer valuable information there so we can’t just ignore it.
Probably we could change
HttpStatusCode.equals
to match only int code, could you file an issue?
c
Sure that makes sense. Will do!