title: Java Web Flux : How to fetch body from ServerHttpResponse?
body: <p>I have implemented custom ServerHttpRequestDecorator to fetch request body But unable to do the same for response.</p>
  
  <pre><code>@Override
      public Mono&lt;Void&gt; filter(ServerWebExchange exchange, WebFilterChain chain)
      {
          long start = System.currentTimeMillis();
          LogServerWebExchangeDecorator exchangeDecorator = new LogServerWebExchangeDecorator(
                  exchange);
          exchangeDecorator.getResponse().beforeCommit(() -&gt;
          {
              logRequest(exchangeDecorator.getRequest(), exchangeDecorator.getRequestBody());
              logResponse(exchangeDecorator.getRequest(), exchangeDecorator.getResponse(), start);
              return Mono.empty();
          });
          return chain.filter(exchangeDecorator);
      }
  </code></pre>
  
  <p>How can achieve the same?</p>