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

Marko Kunic

11/03/2021, 4:34 PM
Hello, I am using ktor client, I am wondering how can I get the response from the client without using coroutines? found some links that say to use
runBlocking
but still not sure how to get the response outside of it?
h

hfhbd

11/03/2021, 4:54 PM
runblocking
waits and returns the last expression in the lambda
Copy code
val syncValue = runBlocking { client.get("<https://google.com>") }
👍 1
m

Marko Kunic

11/03/2021, 4:57 PM
thanks
4 Views