def parse_content_type(value):
    # type: (str) -> str
    """
    Parse out the content type from a content type header.

    >>> parse_content_type('application/json; charset=utf8')
    'application/json'

    """
    if not value:
        return ''

    return value.split(';')[0].strip()