Called at the beginning of a request before `get`/`post`/etc. Override this method to perform common initialization regardless of the request method. Asynchronous support: Use ``async def`` or decorate this method with `.gen.coroutine` to make it asynchronous.
(self)
| 278 | options = _unimplemented_method # type: Callable[..., Optional[Awaitable[None]]] |
| 279 | |
| 280 | def prepare(self) -> Optional[Awaitable[None]]: |
| 281 | """Called at the beginning of a request before `get`/`post`/etc. |
| 282 | |
| 283 | Override this method to perform common initialization regardless |
| 284 | of the request method. |
| 285 | |
| 286 | Asynchronous support: Use ``async def`` or decorate this method with |
| 287 | `.gen.coroutine` to make it asynchronous. |
| 288 | If this method returns an ``Awaitable`` execution will not proceed |
| 289 | until the ``Awaitable`` is done. |
| 290 | |
| 291 | .. versionadded:: 3.1 |
| 292 | Asynchronous support. |
| 293 | """ |
| 294 | pass |
| 295 | |
| 296 | def on_finish(self) -> None: |
| 297 | """Called after the end of a request. |