def get(self, request_id): resp = db_api.get_response_body(request_id) if not resp: raise HTTPError(404) mimetype = resp['mimetype'] encoding = resp['content_encoding'] out = xhtml_escape(hexdump.hexdump(resp['body'], 'return')) self.write(dict(mimetype=mimetype, encoding=encoding, body=out))
def get(self, request_id): resp = db_api.get_response_body(request_id) if not resp: raise HTTPError(404) mimetype = resp['mimetype'] encoding = resp['content_encoding'] out = format_http_body(encoding, mimetype, resp['body']) self.write(out)
def get(self, request_id): resp = db_api.get_response_body(request_id) if not resp: raise HTTPError(404) mimetype = resp['mimetype'] body = xhtml_escape(str(resp['body']).decode('UTF-8', 'ignore')) self.write(dict(mimetype=mimetype, body=body))
def get(self, request_id): resp = db_api.get_response_body(request_id) if not resp: raise HTTPError(404) self.set_header('Content-Type', resp['mimetype']) self.write(str(resp['body']))