title: HTTP POST is not working with Webclient but working with RestTemplate
body: <p>I am getting Error while making POST calls with webclient as below</p>
  <pre><code>org.springframework.web.reactive.function.client.WebClientRequestException: An existing connection was forcibly closed by the remote host; nested exception is java.io.IOException: An existing connection was forcibly closed by the remote host
  </code></pre>
  <p>But same request working fine with restetemplate, both code as below</p>
  <pre><code>        RestTemplate restTemplate = new RestTemplate();
          final String baseUrl = &quot;https://somehost/rest/v1/leads.json&quot;;
          URI uri = null;
          try {
              uri = new URI(baseUrl);
          } catch (URISyntaxException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          HttpHeaders headers = new HttpHeaders();
          headers.set(&quot;Authorization&quot;, &quot;Bearer 39131a98-7a53-497f-8e04-ca08c35a7775:sj&quot;);    
          HttpEntity&lt;Lead&gt; request = new HttpEntity&lt;&gt;(convertToLead(consent), headers);
          ResponseEntity&lt;LeadResponse&gt; result = restTemplate.postForEntity(uri, request, LeadResponse.class);
          System.out.println(result.getBody().toString());
  </code></pre>
  <p>Failed with Webclient code</p>
  <pre><code>ResponseEntity&lt;Response&gt; leadResponse = marketoWebClient.post().uri(&quot;/leads.json&quot;).bodyValue(lead).exchange()
                  .flatMap(clientResponse -&gt; clientResponse.toEntity(LeadResponse.class).doOnSuccess(response -&gt; {
                      if (clientResponse.statusCode().isError()) {
                          logger.debug(&quot;Error Details = {} {}&quot;, clientResponse.statusCode(), response);
                      }
                  })).block();
  </code></pre>