code: func (r *Request) URL() *url.URL {
  	p := r.pathPrefix
  	if r.namespaceSet && len(r.namespace) > 0 {
  		p = path.Join(p, "namespaces", r.namespace)
  	}
  	if len(r.resource) != 0 {
  		p = path.Join(p, strings.ToLower(r.resource))
  	}
  	// Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compat if nothing was changed
  	if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 {
  		p = path.Join(p, r.resourceName, r.subresource, r.subpath)
  	}
  
  	finalURL := &url.URL{}
  	if r.baseURL != nil {
  		*finalURL = *r.baseURL
  	}
  	finalURL.Path = p
  
  	query := url.Values{}
  	for key, values := range r.params {
  		for _, value := range values {
  			query.Add(key, value)
  		}
  	}
  
  	// timeout is handled specially here.
  	if r.timeout != 0 {
  		query.Set("timeout", r.timeout.String())
  	}
  	finalURL.RawQuery = query.Encode()
  	return finalURL
  }
docs: // URL returns the current working URL.