I have the following code in Scala:
val status: Future[String] = Await.ready(Http(address OK as.String), 1 second)
I'm making a http
call and I'm waiting for an answer for a second.
I was told it's not good practice to block using Await.ready
.
I'm curious what I can use instead.
Can I use for comprehensions? How?