title: How to get the request body in the middleware
body: <p>I need to get the request body in the middleware. Something like:</p>
  
  <pre><code>return func(w http.ResponseWriter, req *http.Request) {
  
      data, err := handler(w, req)
  
      if err != nil {
          buf := new(bytes.Buffer)
          buf.ReadFrom(req.Body)
          s := buf.String()
  </code></pre>
  
  <p>But I get <code>s == ""</code> with POST request with body.
  Why and how can I fix it ?</p>