'headers: list of RFC822-style \'Key: value\' strings'

def __init__(self, headers=[], url=None):

    import email
    self._headers = email.message_from_string('\n'.join(headers))
    self._url = url
