code: func createRequest(method string, url string,
  	payload interface{}, onlyFields []string,
  	options ...RequestOptions) (req *http.Request, err error) {
  
  	body, err := convertPayload(payload, onlyFields)
  	if err != nil {
  		return req, fmt.Errorf("creating request: %s\n", err)
  	}
  	req, err = http.NewRequest(method, url, bytes.NewBuffer(body))
  	if err != nil {
  		return req, fmt.Errorf("creating request: %s\n", err)
  	}
  	for _, option := range options {
  		option(req)
  	}
  	userAgent(req)
  	req.Header.Add("Accept", "application/json")
  	return req, err
  }
docs: // createRequest is the main core function.