Purge an individual URL.
175878
def	purge_url(self, host, path):
		""""""
		content = self._fetch(path, method="PURGE", headers={ "Host": host }) 
		return FastlyPurge(self, content)
723487
def stripped_db_url(url):
    """"""
    parsed = urlparse(url)

    if parsed.password is None:
        return url

    return parsed._replace(
        netloc="{}:***@{}".format(parsed.username, parsed.hostname)
    ).geturl()
623756
function stripTrailingSlash(url) {
        var arr = url.split('/');
        if (arr[arr.length - 1] === '') {
            arr.pop();
        }
        return arr.join('/');
    }
119232
def _remove_api_url_from_link(link):
    ''''''
    if link.startswith(_api_url()):
        link = link[len(_api_url()):]
    if link.startswith(_api_url(mirror=True)):
        link = link[len(_api_url(mirror=True)):]
    return link
75365
def _clean_item(self, request_url):
        
        del self._table[request_url]
        self._usage_recency.remove(request_url)
248835
def removePeer(self, url):
        
        q = models.Peer.delete().where(
            models.Peer.url == url)
        q.execute()
529593
function pruneLinks()
    {
        $this->files->ensureDirExists($this->sitesPath(), user());

        $this->files->removeBrokenLinksAt($this->sitesPath());
    }
619369
def split_url(url)
      str = split_get_last(split_get_last(url, '/'), '?')
      str = split_get_last(str, '&', -1)
      str
    end
731208
def delete(self, url, data=None, params=None):
        
        return self.request("delete", url, data, params)
326828
def evict(cls, urls):
        
        if isinstance(urls, text_type):
            urls = [urls]
        urls = set(normalize_url(url) for url in urls)
        retval = 0
        with cls.ca_lock:
            for key in list(cls.cache):
                if key[0] in urls:
                    retval += 1
                    del cls.cache[key]
                    del cls.timeouts[key]
        return retval
841687
def clean_url(url):
        """"""
        if not url.startswith(('http://', 'https://')):
            url = f'http://{url}'

        if not URL_RE.match(url):
            raise BadURLException(f'{url} is not valid')

        return url
632258
function getCleanUrl (url) {
  try {
    const parsed = new URL(url)
    return parsed.pathname || url
  } catch (err) {
    return url
  }
}
746742
function cleanup() {
    if (url) { URL.revokeObjectURL(url); }
    if (ww) { ww.terminate(); }
    if (timeout) { clearTimeout(timeout); }
  }
1159713
def _strip_schema(url):
    """"""
    result = parse_url(url, allow_fragments=False)
    return result.netloc + result.path
47252
def evict(self, urls):
        
        if isinstance(urls, six.string_types):
            urls = (urls,)
        return self.handler.evict(urls)
1144873
def clean_up_auth_url(auth_url):
    """"""

    # NOTE(mnaser): This drops the query and fragment because we're only
    #               trying to extract the Keystone URL.
    scheme, netloc, path, query, fragment = urlparse.urlsplit(auth_url)
    return urlparse.urlunsplit((
        scheme, netloc, re.sub(r'/auth.*', '', path), '', ''))
640244
def unshorten_url(short_url):
    """"""
    short_url = short_url.strip()
    if not short_url.startswith('http'):
        short_url = 'http://{0}'.format(short_url)

    try:
        cached_url = UnshortenURL.objects.get(short_url=short_url)
    except UnshortenURL.DoesNotExist:
        cached_url = UnshortenURL(short_url=short_url)
    else:
        return cached_url.long_url

    try:
        resp = urllib2.urlopen(short_url)
    except (
            urllib2.HTTPError, urllib2.URLError,
            httplib.HTTPException):
        return None

    if resp.code == 200:
        cached_url.long_url = resp.url
        cached_url.save()
        return resp.url