rsapi/auth.go
func buildURL(host, path string) string {
	scheme := "https"
	if httpclient.Insecure {
		scheme = "http"
	}
	u := url.URL{
		Scheme: scheme,
		Host:   host,
		Path:   path,
	}
	return u.String()
}
func buildURL(host, path string) string {
	scheme := "https"
	if httpclient.Insecure {
		scheme = "http"
	}
	u := url.URL{
		Scheme: scheme,
		Host:   host,
		Path:   path,
	}
	return u.String()
}
// Compute API URL given a scheme, hostname and a path