I am using play2.5 with java 8. I am making POST request to server using
WSRequest request = ws.url("http://abababa .com");
WSRequest complexRequest = request.setHeader("X-API-Key", "xxxxxx")
.setHeader("Content-Type", "application/x-www-form-urlencoded")
CompletionStage<WSResponse> responsePromise = complexRequest.post("grant_type=password"
+ "&username=xxxxx&password=yyyyy");
CompletionStage<JsonNode> jsonPromise = responsePromise.thenApply(WSResponse::asJson);
How do I print the final response of the response. I want to return part of the response to this function. Should the function which called this function also have different code compared to synchronous code?