https://kotlinlang.org logo
#http4k
Title
# http4k
s

spierce7

10/19/2021, 3:42 AM
So I’m a little surprised to find this, but I’m not seeing any coroutine support in http4k. Is that the case?
d

dave

10/19/2021, 7:13 AM
Coroutine support is currently only available in the http4k enterprise version
😂 8
👌 1
d

Dmitry Kandalov

10/19/2021, 9:46 AM
s

spierce7

10/19/2021, 1:57 PM
oh wow, support request for coroutines was actually closed. I’m going back to ktor 😛
s

s4nchez

10/19/2021, 3:16 PM
@spierce7 if coroutines is what you need the most from an http toolkit, then http4k is indeed not the best tool for you.
s

spierce7

10/19/2021, 3:20 PM
It’s not what I need most, and I definitely could work without it, but I’ve gotten so used to working with suspend functions and Structured Concurrency, and servers are a fantastic use case for Structured Concurrency, why settle?
r

Razvan

10/19/2021, 3:24 PM
you can still do it, just use
runBlocking {  }
in your handler... you will be using coroutines, just your request will not be asynchronous... but if it's not what you're looking for then no problem with that.
We use them that way for a batch server to run background tasks.
12 Views