@staticmethod
    def _get_content_type(url, session):
        scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
        if scheme not in ('http', 'https'):
            # FIXME: some warning or something?
            # assertion error?
            return ''

        resp = session.head(url, allow_redirects=True)
        resp.raise_for_status()

        return resp.headers.get("Content-Type", "")
Support instance methods.
dataset/ETHPy150Open pypa/pip/pip/index.py/HTMLPage._get_content_type--crossover with--dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/elb/elb.py/memoized.__get__