code: func (r *request) toHTTP() (*http.Request, error) {
  	// Encode the query parameters
  	r.url.RawQuery = r.params.Encode()
  
  	// Check if we should encode the body
  	if r.body == nil && r.obj != nil {
  		b, err := encodeBody(r.obj)
  		if err != nil {
  			return nil, err
  		}
  		r.body = b
  	}
  
  	// Create the HTTP request
  	req, err := http.NewRequest(r.method, r.url.RequestURI(), r.body)
  	if err != nil {
  		return nil, err
  	}
  
  	req.URL.Host = r.url.Host
  	req.URL.Scheme = r.url.Scheme
  	req.Host = r.url.Host
  	req.Header = r.header
  
  	// Setup auth
  	if r.config.HttpAuth != nil {
  		req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password)
  	}
  	if r.ctx != nil {
  		return req.WithContext(r.ctx), nil
  	}
  
  	return req, nil
  }
docs: // toHTTP converts the request to an HTTP request