'Returns the appropriate connection adapter for the given URL.
:rtype: requests.adapters.BaseAdapter'

def get_adapter(self, url):

    for (prefix, adapter) in self.adapters.items():
        if url.lower().startswith(prefix):
            return adapter
    raise InvalidSchema(("No    connection    adapters    were    found    for    '%s'" % url))
