Python之requests错误Expecting value: line 1 column 1 (char 0)
时间:2020-07-12 00:20:36
收藏:0
阅读:2154
修复前
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
原文:https://www.cnblogs.com/PMXGG/p/13286018.html
评论(0)