title: How to read multiple times from a bytes.Buffer?
body: <p>I'm trying to create two HTTP requests with the same request body. Unfortunately, the second request sends an empty body.</p>
  
  <pre><code>w := httptest.NewRecorder()
  w2 := httptest.NewRecorder()
  pd := &amp;postData{
      Data: 5,
  }
  b := new(bytes.Buffer)
  json.NewEncoder(b).Encode(pd)
  req, _ := http.NewRequest("PUT", "/v1/jobs/echo", b)
  server.ServeHTTP(w, req)
  
  req, _ = http.NewRequest("PUT", "/v1/jobs/echo", b)
  server.ServeHTTP(w2, req)
  </code></pre>
  
  <p>Reading through the documentation and the source code for bytes.Buffer, it looks like there's no way to reset the buffer to 0 - there's a Reset method, but this also wipes the buffer's internal state.</p>
  
  <p>Is there a way to "replay" any reader in Go? A bytes.Buffer or any other Reader.</p>