Get value from CompletionStage in java
<p>I am using play2.5 with java 8. I am making POST request to server using</p>

<pre><code>WSRequest request = ws.url("http://abababa .com");
WSRequest complexRequest = request.setHeader("X-API-Key", "xxxxxx")
            .setHeader("Content-Type", "application/x-www-form-urlencoded")
CompletionStage&lt;WSResponse&gt; responsePromise = complexRequest.post("grant_type=password"
            + "&amp;username=xxxxx&amp;password=yyyyy");
CompletionStage&lt;JsonNode&gt; jsonPromise = responsePromise.thenApply(WSResponse::asJson);
</code></pre>

<p>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?</p>