I am using the Play Framework and I am trying to make an HTTP request using the built in WS
support. Whenever I try and make this HTTP request in a controller I get this error
error: cannot find symbol
for the code
public static Result foo(){
return async(//ERROR ON THIS LINE FOR `async()`
WS.url(GoogleStrategy.getTokenUrl).post(getTokenUrlParams).map(
new F.Function<WSResponse, Object>() {
@Override
public Object apply(WSResponse wsResponse) throws Throwable {
return ok(wsResponse.asJson());
}
}
)
);
}
This is odd because in all of the examples shown in the documentation, this seams to be the correct way to do what I wish to do.