发布时间:2019-09-11 07:42:16编辑:auto阅读(1755)
环境:
: python3
后台:java
触发环境 使用 requests post提交数据时,报错如下:
Java 异常: com.alibaba.fastjson.JSONException: syntax error, pos 1, json : check=Y&************** 调用 com.alibaba.fastjson.JSONObject.parseObject 期间。 ******************************** Called from:WEBLIB_MOB_INF.GST_LOGIN.FieldFormula Name:IScript_Login Statement:3
期间 各种度娘,谷歌 帮忙 找到原因, json格式错误
使用post提交json数据应该 使用json处理
import requests
import json
url="http://www.site.com/send"
data={
'mobile':'13999999999',
'msg':'Success'
}
r=requests.post(url=url,data=json.dumps(data))
上一篇: Python算法题----列表去重
下一篇: python + wxPython +
51339
50795
41387
38188
32678
29574
28410
23289
23249
21579
1658°
2386°
1992°
1933°
2261°
1964°
2661°
4466°
4295°
3061°