def request_url(self, request, proxies):
proxy = select_proxy(request.url, proxies)<EOL>scheme = urlparse(request.url).scheme<EOL>is_proxied_http_request = (proxy and scheme != '<STR_LIT>')<EOL>using_socks_proxy = False<EOL>if proxy:<EOL><INDENT>proxy_scheme = urlparse(proxy).scheme.lower()<EOL>using_socks_proxy = proxy_scheme.startswith('<STR_LIT>')<EOL><DEDENT>url = request.path_url<EOL>if is_proxied_http_request and not using_socks_proxy:<EOL><INDENT>url = urldefragauth(request.url)<EOL><DEDENT>return url<EOL>
Obtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
        :rtype: str