https://kotlinlang.org logo
Title
d

dave

11/17/2021, 7:40 AM
Morning! We've upgraded your favourite HTTP library to the newly released Kotlin 1.6.0, and taken the chance to remove all of the existing deprecations in the source. As ever, if you're upgrading from an older version, we recommend going to the latest non-breaking version (4.16.3.0) first and dealing with any deprecations before taking the leap to the new one 🎉 Version v4.17.0.0 available now in Maven Central! 🎉 https://www.http4k.org/changelog/#v41700
🎉 1
🙌 1
👍 4
j

Jordan Terrell

11/17/2021, 2:42 PM
With Kotlin 1.6 stabilizing
Suspending functions as supertypes
and
Suspend conversions
, is changing
HttpHandler
to a suspending function type in our near future?
s

s4nchez

11/17/2021, 3:14 PM
@Jordan Terrell For now, our position hasn’t changed much since we’ve last discussed this issue. Also, given the existing clients (apache/jetty/okhttp) and servers (apache/jetty/netty/ratpack/undertow) don’t work with coroutines, what advantage would you be after with this change?
c

christophsturm

11/18/2021, 9:32 AM
imo thats not 100% correct, both undertow and jetty, and okhttp have non blocking modes that would benefit greatly from coroutines.
1
f

fredrik.nordin

11/18/2021, 9:39 AM
If all you want is non-blocking behaviour, just use a Loom based JVM, which means you still can write your code in familiar style, but still benefit from virtual threads. Works perfectly with Jetty server and/or Apache client, with setup needed to use the correct thread factories in your code. Of course there are still many other reason why you would want to use coroutines to manage the data flow, so I'm not saying you wouldn't want to use them.