'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 to proxy URLs.'

def request_url(self, request, proxies):

    proxies = (proxies or {})
    scheme = urlparse(request.url).scheme
    proxy = proxies.get(scheme)
    if (proxy and (scheme != 'https')):
        url = urldefragauth(request.url)
    else:
        url = request.path_url
    return url
