def route(self, uri, methods=frozenset({'<STR_LIT:GET>'}), host=None,<EOL>strict_slashes=False, stream=False, websocket=False):
<EOL>if not uri.startswith('<STR_LIT:/>'):<EOL><INDENT>uri = '<STR_LIT:/>' + uri<EOL><DEDENT>def response(handler):<EOL><INDENT>if websocket:<EOL><INDENT>handler.is_websocket = True<EOL><DEDENT>elif stream:<EOL><INDENT>handler.is_stream = True<EOL><DEDENT>self.router.add(uri=uri, methods=methods, handler=handler,<EOL>host=host, strict_slashes=strict_slashes)<EOL>return handler<EOL><DEDENT>return response<EOL>
Decorate a function to be registered as a route

        :param uri: path of the URL
        :param methods: list or tuple of methods allowed
        :param host:
        :param strict_slashes:
        :param stream:
        :return: decorated function