I have a Scalatra web application, when a user sends a get request to the server, ie. www.example.com/getsomething it routes to the following code:
class ExampleServlet extends ScalatraServlet {
get("/getsomething") {
//code here
}
}
In the body of the get I would like to send out another get request to another server and capture the JSON that is sent back eg:
var JSONback = GetRequest("www.SomeOtherApi.com/getsomeJSON")
How would I achieve something like this?
Thanks