Flask - Middleware and Extensions
Given this middleware code, what will be printed when a request is made?
class SimpleMiddleware:
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
print('Before app')
response = self.app(environ, start_response)
print('After app')
return response
app = SimpleMiddleware(app)