title: Get body as raw string from ServerWebExchange/ServerHttpRequest
body: <p>I need to get the request body as a raw JSON string in my controller. I'm using Spring WebFlux. If I could change <em><strong>@PostMapper</strong></em> function signature, it will be so easy to get the raw JSON by using &quot;<em><strong>@RequestBody String rawStudent</strong></em>&quot;. But I can't do that as it's auto-generated and will affect other handlers, also &quot;<em><strong>@RequestBody Student</strong></em>&quot; already exist and we can't have two @RequestBody.</p>
  <pre><code>@RestController
  public class StudentController {
      @PostMapping(&quot;/student&quot;)
      private void newStudent(@RequestBody Student student,
                              ServerWebExchange exchange) {
          String rawStudent = ServerExchangeUtils.getRequestRawBody(exchange); //idealy like this
          System.out.println(rawStudent);
      }
  }
  </code></pre>
  <p>What I'm looking for is something like &quot;getRequestRaw(exchange)&quot;</p>