Comment Comment by devxpy >Need to access the request? use `req`Well, I don't see what's especially difficult about this? from flask import request @app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': return do_the_login() else: return show_the_login_form() I would actually argue that this is better, since I have to type "request" only once.Although I have to admitt, the middleware thing looks quite composable. parent devxpy 7 years ago
Well, I don't see what's especially difficult about this?
I would actually argue that this is better, since I have to type "request" only once.Although I have to admitt, the middleware thing looks quite composable.