Play!/Scala 上的新手问题:如何将字符串存储在result中?
object App extends Application {
def route = {
case GET(Path("/feed/geocodeo")) & QueryString(qs) => Action{ request=>
val result = QueryString(qs,"latlng").getOrElse("40.714224,-73.961452")
val response = WS.url("http://maps.googleapis.com/maps/api/geocode/json?latlng="+result.toString+"&sensor=false").get()
val body = response.value.get.body
Ok(body).as("text/html")
}
}
}