@staticmethod<EOL><INDENT>def from_response(response):<DEDENT>
<EOL>http_response = response.raw._original_response<EOL>status_line = "<STR_LIT>" % (http_response.status, http_response.reason)<EOL>headers = str(http_response.msg)<EOL>body = http_response.read()<EOL>response.raw._fp = StringIO(body)<EOL>payload = status_line + "<STR_LIT:\r\n>" + headers + "<STR_LIT:\r\n>" + body<EOL>headers = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": response.request.full_url.encode('<STR_LIT:utf-8>')<EOL>}<EOL>return WARCRecord(payload=payload, headers=headers)<EOL>
Creates a WARCRecord from given response object.

        This must be called before reading the response. The response can be 
        read after this method is called.

        :param response: An instance of :class:`requests.models.Response`.