':param connection: Parent connection object.
:type connection: :class:`.Connection`'

def __init__(self, connection, response=None):

    self._status = None
    self._response = None
    self._headers = {}
    self._error = None
    self._reason = None
    self.connection = connection
    if (response is not None):
        self.headers = lowercase_keys(dict(response.headers))
        self.error = response.reason
        self.status = response.status_code
        self.request = response.request
        self.iter_content = response.iter_content
