MCPcopy Create free account
hub / github.com/EasyIME/PIME / clear

Method clear

python/python3/tornado/web.py:325–337  ·  view source on GitHub ↗

Resets all headers and content for this response.

(self)

Source from the content-addressed store, hash-verified

323 self.request._body_future.exception()
324
325 def clear(self) -> None:
326 """Resets all headers and content for this response."""
327 self._headers = httputil.HTTPHeaders(
328 {
329 "Server": "TornadoServer/%s" % tornado.version,
330 "Content-Type": "text/html; charset=UTF-8",
331 "Date": httputil.format_timestamp(time.time()),
332 }
333 )
334 self.set_default_headers()
335 self._write_buffer = [] # type: List[bytes]
336 self._status_code = 200
337 self._reason = httputil.responses[200]
338
339 def set_default_headers(self) -> None:
340 """Override this to set HTTP headers at the beginning of the request.

Callers 2

__init__Method · 0.95
send_errorMethod · 0.95

Calls 2

set_default_headersMethod · 0.95
timeMethod · 0.80

Tested by

no test coverage detected