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

ribesg

04/23/2019, 1:48 PM
I may have missed something, how do you do a post request without expecting a response body with the Http client?
<http://client.post|client.post><Unit>(...)
or something like that?
👌 1
Why don’t we have some extensions like
suspend inline fun HttpClient.verb(...) = verb<Unit>(...)
?
g

gildor

04/23/2019, 1:53 PM
Maybe just HttpResponse?
r

ribesg

04/23/2019, 1:55 PM
I don’t need that either. It just works or it throws
BadResponseStatusException
, that’s enough information
I just put
...): Unit =
at the end of my call wrapper. Would still prefer not to have to specify
Unit
👍 1
b

bdawg.io

04/23/2019, 3:12 PM
It’s relatively uncommon to make a network request without wanting the content back. As such, I don’t see much reason for the library to provide extensions for such a small use case when it’s already covered by 4 characters
Unit