title: Replace HTTPClient with WebClient in Java
body: <pre><code>        String url = &quot;https://localhost:8080/api/V1/hr/Auth&quot;;
  
          HttpClient client = httpClientFactory.getHttpClient();
          HttpPost request = new HttpPost(url);
          request.addHeader(&quot;content-type&quot;, &quot;application/json&quot;);
          request.addHeader(&quot;clientUniqueId&quot;, &quot;&quot;);
          request.addHeader(&quot;language&quot;, &quot;English&quot;);
  
          jsonObject.put(&quot;UserName&quot;, &quot;&quot;);
          jsonObject.put(&quot;Password&quot;, &quot;&quot;);
  
          StringEntity params = new StringEntity(jsonObject.toString());
  
          request.setEntity(params);
          HttpResponse response;
          response = client.execute(request);
          String responseAsString = EntityUtils.toString(response.getEntity());
  </code></pre>
  <p>I need to replace the httpClient with WebClient
  I have used webflux dependency.
  And tried</p>
  <pre><code>HttpRequest request1 = (HttpRequest) webClientBuilder
                                           .build()
                                           .post()
                                           .uri(url)
                                           .header(&quot;content-type&quot;, &quot;application/json&quot;)
                                           .header(&quot;clientUniqueId&quot;, &quot;&quot;)
                                           .header(&quot;language&quot;, &quot;English&quot;);
  </code></pre>
  <p>Thanks in advance.</p>