MCPcopy
hub / github.com/tornadoweb/tornado / set_default_headers

Method set_default_headers

tornado/web.py:347–355  ·  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

345 self._reason = httputil.responses[200]
346
347 def set_default_headers(self) -> None:
348 """Override this to set HTTP headers at the beginning of the request.
349
350 For example, this is the place to set a custom ``Server`` header.
351 Note that setting such headers in the normal flow of request
352 processing may not do what you want, since headers may be reset
353 during error handling.
354 """
355 pass
356
357 def set_status(self, status_code: int, reason: Optional[str] = None) -> None:
358 """Sets the status code for our response.

Callers 1

clearMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected