async def handler(self, request: Request) -> Tuple[int, str, List[Tuple[str, str]], bytes]:
response: '<STR_LIT>' = Response()<EOL>handler: Callable = empty<EOL>chain_reverse = self.middleware[::-<NUM_LIT:1>]<EOL>for middleware in chain_reverse:<EOL><INDENT>handler = map_context_to_middleware(middleware, self, request, response, handler)<EOL><DEDENT>try:<EOL><INDENT>await handler()<EOL><DEDENT>except HttpException as e:<EOL><INDENT>response.code = e.code<EOL>response.content = e.body<EOL><DEDENT>return response.code, response.status, response.header_as_list, response.output<EOL>
The handler handling each request
:param request: the Request instance
:return: The Response instance