当前位置:首页 > Python教程 > python技巧

python中发送post请求时,报错“Unrecognized token 'xxxx': was expecting ('true', 'false' or 'null')”

解决办法:

如请求参数为 data={“user”=“aaa”,“pwd”=“123456”,sign=“00000000000000”}

需要将参数data先做处理,调用函数datas=datajson.dumps(datas,separators=(‘,‘,‘:‘));

然后在发送post请求request.post(url,datas,.....)

': was expecting ('true', 'false' or 'null')”' ref='nofollow'>python中发送post请求时,报错“Unrecognized token 'xxxx': was expecting ('true', 'false' or 'null')”

原文:https://www.cnblogs.com/me1105/p/9921977.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐