Returns an absolute URL path created from the given route
name, URL parameters, and query values.
772403
function makePath(to, params, query) {
    return this.context.router.makePath(to, params, query);
  }
532984
function routePath (route) {
  if (!route) return ''
  return route.path || (route.regexp && route.regexp.source) || ''
}
4815
def get_path_url(path, relative=False):
    
    if relative:
        return os.path.relpath(path)
    else:
        return 'file://%s' % os.path.abspath(path)
143988
def _get_postvalue_from_absoluteURI(url):
    
    cache = _get_postvalue_from_absoluteURI.cache
    path = cache.get(url, '')
    if not path:
        scheme,authpath = url.split('://')
        s = authpath.split('/', 1)
        if len(s) == 2: path = '/%s' %s[1]
        if len(cache) > _get_postvalue_from_absoluteURI.MAXLEN:cache.clear()
        cache[url] = path
    return path
313785
def get_url(self, *paths, **params):
        
        path_stack = self._attribute_stack[:]
        if paths:
            path_stack.extend(paths)

        u = self._stack_collapser(path_stack)
        url = self._url_template % {
            "domain": self._api_url,
            "generated_url" : u,
        }

        if self._params or params:
            internal_params = self._params.copy()
            internal_params.update(params)
            url += self._generate_params(internal_params)

        return url
1343364
public function route($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($this->prefixRoute($name), $parameters, $absolute);
    }
733345
def build_url_query(current_path, datum = nil)
      unless datum.nil?
        current_path += '?'
        current_path += URI.encode_www_form datum
      end
      current_path
    end
55815
def make_url(self, path, api_root=u'/v2/'):
        """"""
        return urljoin(urljoin(self.url, api_root), path)
890879
def get_path_from_query_string(req):
    
    if req.args.get('path') is None:
        raise exceptions.UserError('Path not found in query string')
    return req.args.get('path')
755474
def construct_url(self):
        """"""
        path = [self.path]
        path.extend([str(x) for x in self.params])

        url = self.client.base_url + '/'.join(x for x in path if x)
        query = self.kwargs.get('query')

        if query:
            # Dict -> List
            if type(query) is dict:
                query = query.items()

            # Remove items with `None` value
            query = [
                (k, v) for (k, v) in query
                if v is not None
            ]

            # Encode query, append to URL
            url += '?' + urlencode(query)

        return url
1173739
def absolute_uri(path)
      if path.match(/^https?:\/{2}/)
        path
      else
        (request.base_url.chomp("/") + path).chomp("/")
      end
    end
939837
def request_path(request):
    """"""
    url = request.get_full_url()
    parts = urlsplit(url)
    path = escape_path(parts.path)
    if not path.startswith("/"):
        # fix bad RFC 2396 absoluteURI
        path = "/" + path
    return path
735487
public function apiRoute($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($this->prefixApiRoute($name), $parameters, $absolute);
    }
257233
public function getAssembledUrl(
		array $parameters=[], bool $is_absolute = false, bool $force_tls = false
	) :string {
		// declare a variable for the assembled url
		$url = $this->url;
		// for each of this url's possible parameters
		foreach($this->indexedParameters as $index => $parameter_name) {
			// if a replacement value has been provided
			$replacement = isset($parameters[$parameter_name]) ? $parameters[$parameter_name] . '/' : '';
			// replace with the value in the url, or remove the parameter placeholder
			$url = str_replace([":{$parameter_name}/",'{'.$parameter_name.'}'] , $replacement , $url);
		}
		// return the assembled route with an absolute prefix if necessary
		return $is_absolute ? Route\Helper::prefixIt($url, $force_tls) : $url;

	}
365307
function Router_createUrl(route, params) {
        var routeRule, url, anchor = '', routes;

        if (!Type.isString(route)) {
            throw new error.HttpError(500, {route: route}, 'RouteRule.createUrl: route must be string type');
        }
        if (!params) {
            params = {};
        } else if (!Type.isObject(params)) {
            throw new error.HttpError(500, {params: params}, 'RouteRule.createUrl: params must be object type');
        }

        Object.keys(params).forEach(function (item) {
            if (item === '#') {
                anchor = '#' + params['#'];
                delete params['#'];
            }
        });

        params = core.copy(params);
        routes = this.routes.slice();

        while (routes.length) {
            routeRule = routes.shift();
            url = routeRule.createUrl(route, params);
            if (url) {
                return this.normalizeUrl('/' + url + anchor);
            }
        }

        url = '/' + this.trim(route, '/');

        if (Object.keys(params).length > 0) {
            url += '?' + this.buildQuery(params);
        }

        return this.normalizeUrl(url + anchor);
    }
1279768
function getRouteParams(route, params) {
  var routeParams = {};

  if (!route.path) return routeParams;

  (0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {
    if (Object.prototype.hasOwnProperty.call(params, p)) {
      routeParams[p] = params[p];
    }
  });

  return routeParams;
}
419151
def url_path(request, base_url=None, is_full=False, *args, **kwargs):
    
    if not base_url:
        base_url = request.path
        if is_full:
            protocol = 'https' if request.is_secure() else 'http'
            base_url = '%s://%s%s' % (protocol, request.get_host(), base_url)

    params = url_params(request, *args, **kwargs)
    url = '%s%s' % (base_url, params)
    return url