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)
| 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. |