def route(
        self,
        uri,
        methods=frozenset({"GET"}),
        host=None,
        strict_slashes=None,
        stream=False,
        version=None,
        name=None,
    ):
        """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:
        :param version:
        :param name: user defined route name for url_for
        :return: decorated function
        """

        # Fix case where the user did not prefix the URL with a /
        # and will probably get confused as to why it's not working
        if not uri.startswith("/"):
            uri = "/" + uri

        if stream:
            self.is_request_stream = True

        if strict_slashes is None:
            strict_slashes = self.strict_slashes

        def response(handler):
            args = list(signature(handler).parameters.keys())

            if not args:
                raise ValueError(
                    "Required parameter `request` missing "
                    "in the {0}() route?".format(handler.__name__)
                )

            if stream:
                handler.is_stream = stream

            self.router.add(
                uri=uri,
                methods=methods,
                handler=handler,
                host=host,
                strict_slashes=strict_slashes,
                version=version,
                name=name,
            )
            return handler

        return response