code: func (c *Client) NewJsonRequest(method Method, endpoint string, obj interface{}) (req *Request) {
  	req = c.newRequest(method, endpoint)
  	if obj == nil {
  		return
  	}
  
  	req.prepare = func(httpReq *http.Request) error {
  		var buffer bytes.Buffer
  		encoder := json.NewEncoder(&buffer)
  		if err := encoder.Encode(obj); err != nil {
  			return err
  		}
  
  		// set to the request
  		httpReq.Body = ioutil.NopCloser(&buffer)
  		httpReq.ContentLength = int64(buffer.Len())
  		httpReq.Header.Set("Content-Type", "application/json")
  		return nil
  	}
  
  	return req
  }
docs: // NewJsonRequest generates a new Request object and JSON encodes the provided
  // obj. The JSON object will be set as the body and included in the request.