title: POST Request in WebClient in Spring Boot and Receive responce as JSONObject
body: <p>I am trying to make <strong>API POST Request</strong> with <strong>WebClient</strong> in Spring Boot. But I cannot to make a request and receive response as <em>JSONObject</em>. With RestTemplate I did it, recently I started to learn WebClient. So that I got stuck.</p>
  <p>Error Spring gives:
  <strong>Error:(48, 28) java: incompatible types: no instance(s) of type variable(s) T exist so that reactor.core.publisher.Mono conforms to org.json.simple.JSONObject</strong></p>
  <p>Here is my source code:</p>
  <p><strong>Controller.java</strong></p>
  <pre><code>        JSONObject jsonObject = new JSONObject();
          Turnover turnover = new Turnover();
  
                 JSONObject resp = webClientBuilder.build()
                  .post()
                  .uri(&quot;http://180.12.10.10:8080/turnover/&quot;)
                  .contentType(MediaType.APPLICATION_FORM_URLENCODED)
                  .accept(MediaType.APPLICATION_JSON )
                  .body(Mono.just(turnover),Turnover.class)
                  .retrieve()
                  .bodyToMono(JSONObject.class);
  </code></pre>
  <p><strong>Turnover.java</strong></p>
  <pre><code>
  @Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  
  public class Turnover {
  
      private String start_date;
      private String end_date;
      private String account;
  
      public Turnover(){
          setStart_date(&quot;01.01.2020&quot;);
          setEnd_date(&quot;01.06.2020&quot;);
          setAccount(&quot;20296&quot;);
      }
  }
  </code></pre>
  <p><strong>Json I want to send</strong></p>
  <pre><code>{
    &quot;start_date&quot;:&quot;01.01.2020&quot;,
    &quot;end_date&quot;:&quot;01.06.2020&quot;,
    &quot;account&quot;:&quot;20296&quot;
  }
  </code></pre>
  <p><strong>Response API Returns:</strong></p>
  <pre><code>{
      &quot;status&quot;: 1,
      &quot;message&quot;: &quot;success&quot;,
      &quot;data&quot;: [
          {
              &quot;CODE_ACCOUNT&quot;: &quot;20296&quot;,
              &quot;CREDIT&quot;: 60610187386.86,
              &quot;DEBIT&quot;: 60778253872.1
          }
      ]
  }
  </code></pre>
  <p>Any Help is appreciated!</p>