code: func NewJSONRequest(method, path string, v interface{}) (*http.Request, error) {
  	var r io.Reader
  	if v != nil {
  		raw, err := json.Marshal(v)
  		if err != nil {
  			return nil, err
  		}
  		r = bytes.NewReader(raw)
  	}
  
  	req, err := http.NewRequest(method, path, r)
  	if err != nil {
  		return nil, err
  	}
  	if v != nil {
  		req.Header.Set("Content-Type", "application/json")
  	}
  	return req, nil
  }
docs: // NewJSONRequest generates a new http.Request with the body set to the json
  // encoding of v.