(
self,
request: Request,
)
| 27 | return response |
| 28 | |
| 29 | async def handle_async_request( |
| 30 | self, |
| 31 | request: Request, |
| 32 | ) -> Response: |
| 33 | await request.aread() |
| 34 | response = self.handler(request) |
| 35 | |
| 36 | # Allow handler to *optionally* be an `async` function. |
| 37 | # If it is, then the `response` variable need to be awaited to actually |
| 38 | # return the result. |
| 39 | |
| 40 | if not isinstance(response, Response): |
| 41 | response = await response |
| 42 | |
| 43 | return response |
no test coverage detected