title: How to use WebClient to execute synchronous request?
body: <p>Spring documentation states that we have to switch from RestTemplate to <code>WebClient</code> even if we want to execute synchronous http call.</p>
  
  <p>For now I have following code:</p>
  
  <pre><code>  Mono&lt;ResponseEntity&lt;PdResponseDto&gt;&gt; responseEntityMono = webClient.post()
                  .bodyValue(myDto)
                  .retrieve()
                  .toEntity(MyDto.class);
          responseEntityMono.subscribe(resp -&gt; log.info("Response is {}", resp));
     //I have to return response here
     // return resp;
  </code></pre>
  
  <p>Sure I could use CountdownLatch here but it looks like API misusing.</p>
  
  <p>How could I execute synchronous request ?</p>