| | |
| | | @RequestParam(value = "password",required = false) String password) |
| | | { |
| | | // String resultJson = HttpClientUtil.sendPostByJson("http://117.172.73.171:9901/aaToken?username="+username+"&password="+password, null,3,null,null); |
| | | String resultJson = HttpClientUtil.sendPostByJson("http://117.172.73.171:9901/aaToken?username=huacheng&password=hc1236987", null,3,null,null); |
| | | return R.ok(resultJson); |
| | | // String resultJson = HttpClientUtil.sendPostByJson("http://117.172.73.171:9901/aaToken?username=huacheng&password=hc1236987", null,3,null,null); |
| | | try { |
| | | String result=HttpClientUtil.httpPost("http://117.172.73.171:9901/aaToken?username=huacheng&password=hc1236987", |
| | | null); |
| | | return R.ok(result); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail(e); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | try { |
| | | defaultHttpClient = new DefaultHttpClient(); |
| | | HttpPost httpPost = new HttpPost(url); |
| | | httpPost.setHeader("Content-Type", "application/json;charset=ut-8"); |
| | | httpPost.setHeader("Content-Type", "application/json;charset=utf-8"); |
| | | if (StringUtils.isNotBlank(param)) { |
| | | log.info("参数值:{}", param); |
| | | HttpEntity httpEntity = new StringEntity(param, "utf-8"); |