因为@before_request在request之前,所以我取不到request中的args,remote_addr等参数。
但是我想通过装饰器在对请求做一些处理
def other_handle():
//如何得到request参数
@app.route('/login', method=['POST','GET'])
@other_hangdle
def login():
……
装饰器函数要怎么写才能获取到request等参数?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
使用
flask的request对象交换一下顺序不行吗?