python学习之-获取get和post请求 转载 https://blog.csdn.net/guokeshun/article/details/80774831

1.python接收get请求里的参数

req = request.args.get('xxx')

2.python接收post请求里的参数

req = request.form.get('xxx')

3从前端获取json数据 from flask import request import json data=json.loads(request.get_data())

猜你喜欢

转载自blog.csdn.net/candy134834/article/details/86518798