Python之requests错误Expecting value: line 1 column 1 (char 0)

时间:2020-07-12 00:57:06   收藏:0   阅读:521

修复前
self.r =requests.post(url,params=params,headers=headers,timeout=Interface_Time_Out)
修复后
self.r =requests.post(url,data=params,headers=headers,timeout=Interface_Time_Out)
原因
http://httpbin.org/get?key1=value1&key2=value2

params关键字代表的是query string(从字符“?”开始的就是query string)

data关键字代表的是body中的form

json关键字代表的是body中的json

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!