title: Go net/http request body is always nil
body: <p>The http request body is always nil. Why is this happening? I am using the gokit toolkit. Below code is part of the handler.</p>
  
  <pre><code>    func decodeAddRequest(_ context.Context, r *http1.Request) (interface{}, error) {
      req := endpoint.AddRequest{}
      p, _ := ioutil.ReadAll(r.Body)
      fmt.Printf("%s\n", p)
      err := json.NewDecoder(r.Body).Decode(&amp;req)
      return req, err
  }
  </code></pre>
  
  <p>My POST JSON request looks like this</p>
  
  <pre><code>{
      "title": "test test",
      "complete": false
  }
  </code></pre>
  
  <p>And what gets saved to the database is </p>
  
  <pre><code>{
      "title": "",
      "complete": false
  }
  </code></pre>
  
  <p>The type are:</p>
  
  <pre><code>type AddRequest struct {
      Todo io.Todo `json:"todo"`
  }
  
  type Todo struct {
      Id       bson.ObjectId `json:"id" bson:"_id"`
      Title    string        `json:"title" bson:"title"`
      Complete bool          `json:"complete" bson:"complete"`
  }
  </code></pre>