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

Method set_default_headers

python/python3/tornado/web.py:339–347  ·  view source on GitHub ↗

Override this to set HTTP headers at the beginning of the request. For example, this is the place to set a custom ``Server`` header. Note that setting such headers in the normal flow of request processing may not do what you want, since headers may be reset during er

(self)

Source from the content-addressed store, hash-verified

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.
341
342 For example, this is the place to set a custom ``Server`` header.
343 Note that setting such headers in the normal flow of request
344 processing may not do what you want, since headers may be reset
345 during error handling.
346 """
347 pass
348
349 def set_status(self, status_code: int, reason: Optional[str] = None) -> None:
350 """Sets the status code for our response.

Callers 1

clearMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected