title: How to get data from a REST API endpoint that returns CompletableFuture
body: <p>Folks,</p>
  <p>My http endpoint returns CompletableFuture</p>
  <pre><code>@HttpEndpoint
  public CompletableFuture&lt;Student&gt; processStudent(Request request){
         return CompletableFuture.supplyAsync(()-&gt;saveStudent(request));
  }
  </code></pre>
  <p>My http client is</p>
  <pre><code> studentCompletableFuture = restTemplate.postForObject(URL, request, CompletableFuture.class);
   Student student = studentCompletableFuture .get();
  </code></pre>
  <p>I am not able to get student back to the client .</p>
  <p>I searched in google and stackoverflow and found that once we get CompletableFuture with placeholder (empty response) as response from server, http connection will be closed and we cannot apply get() to get the student data.</p>
  <p>My rest endpoint should be async, <strong>how to get the actual student response back to client</strong> ?</p>