Python 之 Requests 参数格式
x-www-form-urlencoded
当requests的content-typ为"content-type": "application/x-www-form-urlencoded; charset=UTF-8",时请求参数当如下
1 | r = requests.post( |
json
当requests的content-typ为"Content-Type": "application/json;charset=UTF-8",时请求参数当如下
1 | r = requests.post( |
x-www-form-urlencoded时应该为一个字典,json时应该为一个json字符串