表单、get、post请求到flask后端,如何接受参数呢?
表单数据表单submit请求,后端如何接收数据?
1
2
3request.form['key1']
request.form['key2']
request.form['key3']html页面get请求?
1
2
3# http://localhost:5000/user_info?user_id=1
flask后端
user_id = request.args.get('user_id')html页面post请求?
1
2
3params = request.get_json()
username = params.get("username")
recipient_email = params.get('recipient_email')
日积月累。