Created
February 14, 2013 12:46
-
-
Save erwan/4952532 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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