title: Golang cant get body from request.GetBody()
body: <p>I try to read the request body via request.GetBody(), since I need to read the same request body more than once, but I always get the error below. I checked if the req.body is empty, but it is not. I cant even call req.GetBody(). My Go version is 1.8.1. </p>
  
  <pre><code> func read(res http.ResponseWriter, req *http.Request) {
  
       _, err := req.GetBody()
      if err != nil {
          res.Write([]byte(err.Error()))
          return
      }
  
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>http: panic serving [::1]:53174: runtime error: invalid memory address or nil pointer dereference
  </code></pre>