':param response: HTTP response object. (optional)
:type response: :class:`httplib.HTTPResponse`
:param connection: Parent connection object.
:type connection: :class:`.Connection`'

def __init__(self, response, connection):

    self.connection = connection
    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
    self.body = (response.text.strip() if ((response.text is not None) and hasattr(response.text, 'strip')) else '')
    if (not self.success()):
        raise exception_from_message(code=self.status, message=self.parse_error())
    self.object = self.parse_body()
