title: Java Spring Boot Webflux - Mono response when there is no http body, but just http status
body: <p>Small question regarding Spring Boot Webflux 2.5.0 and how to deal with a http response without body.</p>
  <p>By &quot;without body&quot; I mean:</p>
  <p>For instance, a web application I consume the rest API and have no control returns:</p>
  <pre><code>HTTP status code 200
  HTTP body {&quot;foo&quot;: &quot;bar&quot;}
  </code></pre>
  <p>With Spring Webflux, we can easily write something like:</p>
  <pre><code>public Mono&lt;FooBar&gt; sendRequest(SomeRequest someRequest) {
          return webClient.mutate()
                          .baseUrl(&quot;https://third-party-rest-api.com:443&quot;)
                          .build()
                          .post()
                          .uri(/someroute)
                          .body(BodyInserters.fromValue(someRequest))
                          .retrieve().bodyToMono(FooBar.class);
  }
  
  public class FooBar {
      
      private String foo;
  
      //getter setters
  
  }
  </code></pre>
  <p>In order to get the POJO corresponding to the http body.</p>
  <p>Now, another third party API I am consuming only return HTTP 200 as status response.
  I would like to emphasize, there is no HTTP body. It is not the empty JSON {}.</p>
  <p>Hence, I am a bit lost, and do not know what to put here. Especially with the goal of avoiding the mono empty.</p>
  <pre><code>public Mono&lt;WhatToPutHerePlease&gt; sendRequest(SomeRequest someRequest) {
          return webClient.mutate()
                          .baseUrl(&quot;https://third-party-rest-api.com:443&quot;)
                          .build()
                          .post()
                          .uri(/someroute-with-no-http-body-response)
                          .body(BodyInserters.fromValue(someRequest))
                          .retrieve()
                          .bodyToMono(WhatToPutHerePlease.class);
  }
  </code></pre>
  <p>Any help please?</p>
  <p>Thank you</p>