我想用邮递员传递参数。然而,在邮递员发送POST请求后,对于我想要获得的每个参数,它总是返回无。我做错了什么?
@app.route('/', methods=['GET', 'POST'])
def Todo_all():
......
if request.method == 'POST':
title = request.values.get("title", type=str, default=None)
description = request.values.get("description", type=str, default=None)
return mytodo.create(title, description)
我也试过
request.form.get
request.data
我尝试在控制台中打印该值,并且无
print request.form.get('title')