def request(self, *args, **kwargs):
        """
        Define a Decorate to be called before a request.
        eg: @middleware.request
        """
        middleware = args[0]

        @wraps(middleware)
        def register_middleware(*args, **kwargs):
            self.request_middleware.append(middleware)
            return middleware

        return register_middleware()
Define a Decorate to be called before a request.
        eg: @middleware.request