Adds a middleware object used to process all incoming requests against the API

def add_middleware(self, middleware):
        """Adds a middleware object used to process all incoming requests against the API"""
        if self.middleware is None:
            self._middleware = []
        self.middleware.append(middleware)