The edit/create url base parameters
178531
protected function EditParams()
    {
        $params = array();
        $params['page'] = $this->page->GetID();
        $params['area'] = $this->area->GetID();
        return $params;
    }
516201
def __build_url(self, api_call, **kwargs):
        """"""
        kwargs['key'] = self.api_key
        if 'language' not in kwargs:
            kwargs['language'] = self.language
        if 'format' not in kwargs:
            kwargs['format'] = self.__format
        api_query = urlencode(kwargs)

        return "{0}{1}?{2}".format(urls.BASE_URL,
                                   api_call,
                                   api_query)
667498
def _build_url(cls, request, path=None, **changes):
        
        changes = {k: v for k, v in changes.items() if v is not None}
        queries = {**request.url.query, **changes}
        queries = {k: v for k, v in queries.items() if v is not False}
        query_strings = []

        def add_query(key):
            query_strings.append('{}={}'.format(key, queries[key])
                                 if queries[key] != '' else key)

        def del_query(key):
            queries.pop(key, None)

        if 'head' in queries:
            add_query('head')
            del_query('head')

        if 'start' in changes:
            add_query('start')
        elif 'start' in queries:
            add_query('start')

        del_query('start')

        if 'limit' in queries:
            add_query('limit')
            del_query('limit')

        for key in sorted(queries):
            add_query(key)

        scheme = cls._get_forwarded(request, 'proto') or request.url.scheme
        host = cls._get_forwarded(request, 'host') or request.host
        forwarded_path = cls._get_forwarded(request, 'path')
        path = path if path is not None else request.path
        query = '?' + '&'.join(query_strings) if query_strings else ''

        url = '{}://{}{}{}{}'.format(scheme, host, forwarded_path, path, query)
        return url
1033787
def create_url(url_protocol, host, api, url_params):
    
    is_batch = url_params.pop("batch", None)
    apis = url_params.pop("apis", None)
    version = url_params.pop("version", None) or url_params.pop("v", None)
    method = url_params.pop('method', None)

    host_url_seg = url_protocol + "://%s" % host
    api_url_seg = "/%s" % api
    batch_url_seg = "/batch" if is_batch else ""
    method_url_seg = "/%s" % method if method else ""

    params = {}
    if apis:
        params["apis"] = ",".join(apis)
    if version:
        params["version"] = version

    url = host_url_seg + api_url_seg + batch_url_seg + method_url_seg
    if params:
        url += "?" + urlencode(params)

    return url
1179000
public static String newUrl(final String baseUrl, 
        final Collection<Pair<String, String>> params)
        {
        final StringBuilder sb = new StringBuilder();
        sb.append(baseUrl);
        sb.append(getUrlParameters(params, true));
        return sb.toString();
        }
1002613
function addURIParams(uri, params) {
  uri = uri || "";
  params = params || {};

  params = _.clone(params);

  var keys = _.keys(params);

  var separatedPath = uri.split("/");

  separatedPath = _.compact(separatedPath);

  //Replacing Any Path Elements
  separatedPath = _.map(separatedPath, function(pathEntry) {
    if (pathEntry.indexOf(":") !== 0) {
      return pathEntry;
    }

    var key = _.find(keys, function(key) {
      return (":" + key) === pathEntry;
    });

    if (key) {
      return params[key];
    } else {
      return {
        key: pathEntry.substring(1, pathEntry.length),
        error: constants.PROPERTY_NOT_SET
      };
    }
  });

  //If the path contains an invalid parameter, return the error object
  var invalidParameter = _.findWhere(separatedPath, {error: constants.PROPERTY_NOT_SET});

  if (invalidParameter) {
    return invalidParameter;
  }

  var fullPath = "";

  _.each(separatedPath, function(pathElem) {
    return fullPath += "/" + pathElem;
  });

  return fullPath;
}
538621
function buildPath (basePath, queryParams) {
    basePath = basePath.concat('?')
    var url = basePath.concat(queryString.stringify(queryParams))
    return url
  }
901447
function URL(input, base) {
        var baseURL;
        if (base) {
            base = base.href || base;
            baseURL = _parseURL(base);
            if (!baseURL || !baseURL.scheme) {
                throw new SyntaxError();
            }
            Object.defineProperty(this, "_baseURL", {
                value: baseURL
            });
        }

        var url = _parseURL(input, baseURL);
        if (!url) {
            throw new SyntaxError();
        }

        Object.defineProperty(this, "_input", {
            value: input,
            writable: true
        });

        Object.defineProperty(this, "_url", {
            value: url,
            writable: true
        });

        var query = new URLQuery(this);
        Object.defineProperty(this, "query", {
            get: function() {
                return this._url ? query : null;
            },
            enumerable: true
        });
    }
178828
private function processURL(): void
    {
        $defaultPath = '';
        $basePath = explode('?', urldecode($_SERVER['REQUEST_URI']));
        $requestURI = explode('/', rtrim($basePath[0], '/'));
        $requestURI[0] = strtoupper($_SERVER['REQUEST_METHOD']);
        $scriptName = explode('/', $_SERVER['SCRIPT_NAME']);
        $sizeofRequestURI = sizeof($requestURI);
        $sizeofScriptName = sizeof($scriptName);
        for ($x = 0; $x < $sizeofRequestURI && $x < $sizeofScriptName; $x++) {
            if (strtolower($requestURI[$x]) == strtolower($scriptName[$x])) {
                $defaultPath .= '/' . $requestURI[$x];
                unset($requestURI[$x]);
            }
        }
        $this->default = $defaultPath . $this->default;
        if (!$this->isFullUrl($this->defaultMobileApp)) {
            $this->defaultMobileApp = $defaultPath . $this->defaultMobileApp;
        }
        $this->parameters = array_values($requestURI);
    }
1231531
function(path, base)
        {
            base = base ? base + "/" : "/";
            if(
                !hasProtocol(base, base.substr(0, 2))
            ) {
                base = location.origin + base;
            }
            var url = new URL(path, base);
            path = url.origin + url.pathname;
            path = path.replace(location.origin, "");
            // path = new URL(path, base).href.replace(location.origin, "");
            // if it has a trailing slash i.e. a directory, remove the trailing slash
            var len = path.length - 1;
            return path[len] === "/" ? path.substr(0, len) : path;
        }
748092
def make_url(*args, **kwargs):
    """"""
    base = "/".join(args)
    if kwargs:
        return "%s?%s" % (base, urlencode(kwargs))
    else:
        return base
99858
function determineBaseURL(url) {

	var baseURL;

	// Check if url is set
	if (url) {

		// Remove whitespace
		baseURL = url.trim();

		baseURL = correctHttpAndHttps(baseURL);
		baseURL = correctQuestionMarkAndAnd(baseURL);
		baseURL = removeParameters(baseURL);

	} else {
		// Throw error (no url)
		throw new Error('The url parameter is not set.');
	}

	return baseURL;
}
601221
function appendApiUrlParam(fullUrl, apiUrl) {
    let appendedUrl = fullUrl;

    if (typeof apiUrl === 'string') {
        if (fullUrl.indexOf('?') === -1) {
            appendedUrl += '?';
        } else {
            appendedUrl += '&';
        }

        appendedUrl += 'apiUrl=';
        // trim trailing slash from URL
        appendedUrl += apiUrl.slice(-1) === '/' ? apiUrl.slice(0, -1) : apiUrl;
    }

    return appendedUrl;
}
697174
protected function _constructBaseUrl($servlet, $params = array())
    {
        if (count($params))
        {
            //escape all parameters appropriately for inclusion in the query string
            $escapedParams = array();

            foreach ($params as $key => $value)
            {
                $escapedParams[] = urlencode($key) . '=' . urlencode($value);
            }

            $queryString = $this->_queryDelimiter . implode($this->_queryStringDelimiter, $escapedParams);
        }
        else
        {
            $queryString = '';
        }
        
        if (!$this->_basePath) {
            throw new Exception('Please provide a base path');
        }

        $protocol = 'http://';
        if ($this->_useHttps) {
            $protocol = 'https://';
        }
        return $protocol . $this->_host . ':' . $this->_port . $this->_basePath . $servlet . $queryString;
    }
515288
private static String createBaseUrl(AuthleteConfiguration configuration)
    {
        String baseUrl = configuration.getBaseUrl();

        // If the configuration does not contain a base URL.
        if (baseUrl == null)
        {
            throw new IllegalArgumentException("The configuration does not have information about the base URL.");
        }

        try
        {
            // Check whether the format of the given URL is valid.
            new URL(baseUrl);
        }
        catch (MalformedURLException e)
        {
            // The format of the base URL is wrong.
            throw new IllegalArgumentException("The base URL is malformed.", e);
        }

        if (baseUrl.endsWith("/"))
        {
            // Drop the '/' at the end of the URL.
            return baseUrl.substring(0, baseUrl.length() - 1);
        }
        else
        {
            // Use the value of the base URL without modification.
            return baseUrl;
        }
    }
1015348
private function prepare_base_string() {
    $url = $this->request_settings['url'];

    # if the host header is set we need to rewrite the basestring to use
    # that, instead of the request host. otherwise the signature won't match
    # on the server side
    if (!empty($this->request_settings['headers']['Host'])) {
      $url = str_ireplace(
        $this->config['host'],
        $this->request_settings['headers']['Host'],
        $url
      );
    }

    $base = array(
      $this->request_settings['method'],
      $url,
      $this->request_settings['basestring_params']
    );
    $this->request_settings['basestring'] = implode('&', $this->safe_encode($base));
  }
1063852
def base_url(self):
        ''''''
        config_value = self.config.get('url')
        if config_value:
            return self._clean_url(config_value)
        default_url = current_app.config.get('FS_URL')
        default_url = current_app.config.get('{0}URL'.format(self.backend_prefix), default_url)
        if default_url:
            url = urljoin(default_url, self.name)
            return self._clean_url(url)
        return url_for('fs.get_file', fs=self.name, filename='', _external=True)