Commit ba62db80f4cf60bb9bb823a0a8485b9059869a86
1 parent
074216e8
回调修改
Showing
1 changed file
with
6 additions
and
3 deletions
src/main/java/com/cnlive/shenhe/utils/AuditPass.java
| @@ -38,15 +38,18 @@ public class AuditPass { | @@ -38,15 +38,18 @@ public class AuditPass { | ||
| 38 | params.put("attr_tags",attr_tags); | 38 | params.put("attr_tags",attr_tags); |
| 39 | params.put("msg",msg); | 39 | params.put("msg",msg); |
| 40 | HttpUtil httpUtil = HttpUtil.init(); | 40 | HttpUtil httpUtil = HttpUtil.init(); |
| 41 | - String URL =callBack+"?platform="+platformKey+"&token="+token+"¶m="+params.toJSONString(); | 41 | + httpUtil.setHeader("Content-Type","x-www-form-urlencoded;charset=UTF-8"); |
| 42 | + httpUtil.setParam("param",params.toJSONString()); | ||
| 43 | + String URL =callBack+"?platform="+platformKey+"&token="+token; | ||
| 42 | Map<String, String> post = httpUtil.post(URL); | 44 | Map<String, String> post = httpUtil.post(URL); |
| 43 | return JSONObject.parseObject(post.get("result")); | 45 | return JSONObject.parseObject(post.get("result")); |
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | public JSONObject commentPass(JSONObject json,String callBack){ | 48 | public JSONObject commentPass(JSONObject json,String callBack){ |
| 47 | HttpUtil httpUtil = HttpUtil.init(); | 49 | HttpUtil httpUtil = HttpUtil.init(); |
| 48 | - httpUtil.setStringParam(json.toJSONString()); | ||
| 49 | - Map<String, String> post = httpUtil.post(callBack+"?param="+json.toJSONString()); | 50 | + httpUtil.setHeader("Content-Type","x-www-form-urlencoded;charset=UTF-8"); |
| 51 | + httpUtil.setParam("param",json.toJSONString()); | ||
| 52 | + Map<String, String> post = httpUtil.post(callBack); | ||
| 50 | return JSONObject.parseObject(post.get("result")); | 53 | return JSONObject.parseObject(post.get("result")); |
| 51 | } | 54 | } |
| 52 | } | 55 | } |