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 | 38 | params.put("attr_tags",attr_tags); |
| 39 | 39 | params.put("msg",msg); |
| 40 | 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 | 44 | Map<String, String> post = httpUtil.post(URL); |
| 43 | 45 | return JSONObject.parseObject(post.get("result")); |
| 44 | 46 | } |
| 45 | 47 | |
| 46 | 48 | public JSONObject commentPass(JSONObject json,String callBack){ |
| 47 | 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 | 53 | return JSONObject.parseObject(post.get("result")); |
| 51 | 54 | } |
| 52 | 55 | } | ... | ... |