python3 requests 模块 json参数和data参数区别

json 表示使用application/json方式提交请求

data 使用application/form-urlencode方式提交请求

用data参数提交数据时,request.body的内容则为a=1&b=2的这种形式,用json参数提交数据时,request.body的内容则为'{"a": 1, "b": 2}'的这种形式

原文地址:https://www.cnblogs.com/shmily3929/p/8064684.html