Appends a Middleware to the route which is to be executed before the route runs

def middleware(self, args):
        """
        Appends a Middleware to the route which is to be executed before the route runs
        """
        if self.url[(len(self.url) - 1)] == (self.url_, self.controller, dict(method=self.method, request_type=self.request_type, middleware=None)):
            self.url.pop()
        self.url.append((self.url_, self.controller, dict(method=self.method, request_type=self.request_type, middleware=args)))
        return self