接口成功时返回:
{ "reCorde": "SUCCESS", "data": { "user_id": "89", "verify": "e7fc4b0d5605f3fade56f6d513730321", "userName": "13E28C361F75D546E8B688C2851A15D6", "token": "a1U93kb4xkFq89" }, "msg": "成功", "code": 10000 }
注意:
1、Content-Type有可能用谷歌抓取的值为Content-Type:multipart/form-data,但实际上使用这个会导致post请求的data:data=<multipart/form-data>,这真是坑啊!
有时候headers中添加上Content-Type会导致错误,可以删掉试试
2、Content-Type首字母不一定要大写,也可以小写content-type
3、Get Dictionary Keys 和 Get From Dictionary都在Collections库里面,记得引入
4、创建session时写的是host,只写服务器地址,发送post请求时uri只写接口地址,如果两处都写完整的URL地址会导致错误
5、创建参数字典时,注释与最后一个参数不要有空的cell,否则会报错:FAIL : Dictionary item '' does not contain '=' separator.程序会认为中间的也是一个参数,但是没有“=”分割符号