java - Play Framework: Cannot find symbol "async" -
I am using and I try to use the built in HTTP request in for code (static result) foo () {error on this line for async (// `async ') WS.url (GoogleStrategy.getTokenUrl) .post (getTokenUrlParams) .map (New F.Function & LT; WSResponse, Object & gt; () {@Override Public Object Applied (WSResponse wsResponse) Throwing Throws {OK Return (wsResponse.asJson ())}}})); } It is weird because in all the examples shown in the documentation, this is the right way to do fast work which I want to do. You were almost certainly looking at the old version of the document. Current version: WS support I am doing Whenever I try this HTTP request in an administrator, I get this error
error:
async () is no longer required.
Public stable promise & lt; Results & gt; foo () {return WS.url (GoogleStrategy.getTokenUrl) .post (getTokenUrlParams) .map (New F.Function & LT; WSResponse, Result & gt; () {@Override Public Objects Applied (WSResponse wsResponse) The return is fine (wsResponse.jsjson ());}}); }
Comments
Post a Comment