title: How to extract response header & status code from Spring 5 WebClient ClientResponse
body: <p>I am new to Spring Reactive framework &amp; trying to convert Springboot 1.5.x code into Springboot 2.0. I need to return response header after some filtering, body &amp; status code from Spring 5 WebClient ClientResponse. I do not want to use block() method as it will convert it into sync call.
  I am able to get responsebody pretty easily using bodyToMono. Also, I am getting status code, headers &amp; body if I am just returning ClientResponse but I need to process response based on statusCode &amp; header parameters. 
  I tried subscribe, flatMap etc. but nothing works.</p>
  
  <p>E.g. - Below code will return response Body</p>
  
  <pre><code>Mono&lt;String&gt; responseBody =  response.flatMap(resp -&gt; resp.bodyToMono(String.class));
  </code></pre>
  
  <p>But similar paradigm is not working to get statusCode &amp; Response headers.
  Can someone help me in extracting statusCode &amp; header parameters using Spring 5 reactive framework.</p>