Run after-request hook if configured.
(self)
| 167 | func() |
| 168 | |
| 169 | async def _run_after_hooks(self) -> None: |
| 170 | """Run after-request hook if configured.""" |
| 171 | if self.after_request_func is not None: |
| 172 | if inspect.iscoroutinefunction(self.after_request_func): |
| 173 | await self.after_request_func() |
| 174 | else: |
| 175 | self.after_request_func() |
| 176 | |
| 177 | def _finalize_timing(self, request: Request) -> dict | None: |
| 178 | """Calculate final timing information and return headers to add.""" |