Django获取request请求中的参数

支持 post put

json_str = request.body # 属性获取最原始的请求体数据
json_dict = json.loads(json_str)# 将原始数据转成字典格式
json_dict.get("key", "默认值") # 获取数据

参考
https://blog.csdn.net/user_san/article/details/109654028

你可能感兴趣的:(笔记,django,python,后端)