return the full request url as an Url() instance
549730
def url(self):
        """"""
        scheme = self.scheme
        host = self.host
        path = self.path
        query = self.query
        port = self.port

        # normalize the port
        host_domain, host_port = Url.split_hostname_from_port(host)
        if host_port:
            port = host_port

        controller_path = ""
        if self.controller_info:
            controller_path = self.controller_info.get("path", "")

        u = Url(
            scheme=scheme,
            hostname=host,
            path=path,
            query=query,
            port=port,
            controller_path=controller_path,
        )
        return u
229417
def get(self, url):
        '''  '''
        req = r.get(url,
                    headers = self.headers,
                    auth    = self.auth)
        return self.process_request(req)
964853
def url_for(self, *args: str, **kwargs: str) -> URL:
        """"""
        return self._resource.url_for(*args, **kwargs)
571125
def full_url(self):
        
        if self.link == '':
            return None
        else:
            return Note._expand_url(self.link, self.subreddit)
1059210
def path_url(self):
        """"""

        url = []

        p = urlsplit(self.full_url)

        # Proxies use full URLs.
        if p.scheme in self.proxies:
            return self.full_url

        path = p.path
        if not path:
            path = '/'
        url.append(path)

        query = p.query
        if query:
            url.append('?')
            url.append(query)

        return ''.join(url)
347943
def get_url(url: str) -> Union[dict, int, float, str]:
        ''''''

        request = Request(url, headers={"User-Agent": "pypeerassets"})
        response = cast(HTTPResponse, urlopen(request))
        if response.status != 200:
            raise Exception(response.reason)
        return json.loads(response.read().decode())
325229
def url(self):
        
        if not self.abstract:
            return "%s/documents/%i" % ("/".join(self._api.base_url.split("/")[:-2]), self.id)
967966
def make_full_url(request, url):
    
    urlparts = request.urlparts
    return '{scheme}://{site}/{url}'.format(
        scheme=urlparts.scheme,
        site=get_site_name(request),
        url=url.lstrip('/'),
    )
1327517
def get_clean_url(self):
        """"""
        if self.needs_auth:
            self.prompt_auth()
        url = RepositoryURL(self.url.full_url)
        url.username = self.username
        url.password = self.password
        return url
1042180
def get_url(self, resource, params=None):
        

        # replace placeholders

        pattern = r'\{(.+?)\}'

        resource = re.sub(pattern, lambda t: str(params.get(t.group(1), '')), resource)

        # build url

        parts = (self.endpoint, '/api/', resource)
        return '/'.join(map(lambda x: str(x).strip('/'), parts))
257937
def request_url(req=None):
    
    from uliweb import request

    r = req or request
    if request:
        if r.query_string:
            return r.path + '?' + r.query_string
        else:
            return r.path
    else:
        return ''
36305
def get(self):
        
        response, instance = self.request("GET", self.uri)
        return self.load_instance(instance)
817844
def __get_url(self, endpoint):
        
        url = self.url
        api = "wc-api"

        if url.endswith("/") is False:
            url = "%s/" % url

        if self.wp_api:
            api = "wp-json"

        return "%s%s/%s/%s" % (url, api, self.version, endpoint)
802561
def url(self, **urlargs):
        '''
        '''
        if self.defaults:
            d = self.defaults.copy()
            d.update(urlargs)
            urlargs = d
        url = '/'.join(self._url_generator(urlargs))
        if not url:
            return '/'
        else:
            url = '/' + url
            return url if self.is_leaf else url + '/'
311103
def request_uri(self):
        
        result = '/{0}'.format(self.path.lstrip('/'))
        if self.query is not None and self.query != '' and self.query != {}:
            result += '?{0}'.format(self.encoded_query())
        if self.fragment is not None and self.fragment != '':
            result += '#{0}'.format(self.fragment)
        return result
1016468
def _url(self):
        """"""
        if self.ID_NAME not in self.route.keys() and "id" in self.data.keys():
            self.route[self.ID_NAME] = self.data["id"]
        return self.config.BASE + self.PATH.format(**self.route)
560510
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        return "%s/%s" % (url, name)