python中发送post请求时,报错“Unrecognized token 'xxxx': was expecting ('true', 'false' or 'null')”
时间:2018-11-07 14:06:11
收藏:0
阅读:1500
解决办法:
如请求参数为 data={“user”=“aaa”,“pwd”=“123456”,sign=“00000000000000”}
需要将参数data先做处理,调用函数datas=datajson.dumps(datas,separators=(‘,‘,‘:‘));
然后在发送post请求request.post(url,datas,.....)
评论(0)