code: func (r *request) toHTTP() (*http.Request, error) {
  	// Encode the query parameters
  	r.url.RawQuery = r.params.Encode()
  
  	// Get the url sring
  	urlRaw := r.url.String()
  
  	// Check if we should encode the body
  	if r.body == nil && r.obj != nil {
  		if b, err := encodeBody(r.obj); err != nil {
  			return nil, err
  		} else {
  			r.body = b
  		}
  	}
  
  	// Create the HTTP request
  	req, err := http.NewRequest(r.method, urlRaw, r.body)
  
  	// Setup auth
  	if err == nil && r.config.HttpAuth != nil {
  		req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password)
  	}
  
  	return req, err
  }
docs: // toHTTP converts the request to an HTTP request