Skip to content

Instantly share code, notes, and snippets.

@erwan
Created February 14, 2013 12:46
Show Gist options
  • Save erwan/4952532 to your computer and use it in GitHub Desktop.
Save erwan/4952532 to your computer and use it in GitHub Desktop.
package controllers;
import play.*;
import play.mvc.*;
import play.libs.WS;
import play.libs.F.*;
import views.html.*;
public class Application extends Controller {
public static Result index() {
return async(
WS.url("http://www.google.com").get().map(
new Function<WS.Response, Result>() {
public Result apply(WS.Response response) {
return ok(response.getBody());
}
}
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment