I'm following the very first example in the dispatchdocs -
val svc = url("http://api.hostip.info/country.php")
val country = Http(svc OK as.String)
for (c <- country)
println(c)
I do not get any output printed. When I change it to below to make blocking call then I get the output.
val res = country()
println(res)
Need help with this.
Full program-
import dispatch._
object DispatchTest {
def main(args: Array[String]) {
val svc = url("http://api.hostip.info/country.php")
val country = Http(svc OK as.String)
for (c <- country)
println(c)
}
}