Commit 467617052fdb950dfba558b39291c58b4e27a314
1 parent
49e7d85f
update
Showing
1 changed file
with
7 additions
and
7 deletions
src/main/java/com/bsth/data/directive/GatewayHttpUtils.java
| ... | ... | @@ -51,13 +51,13 @@ public class GatewayHttpUtils { |
| 51 | 51 | |
| 52 | 52 | post.setEntity(new StringEntity(jsonStr, "utf-8")); |
| 53 | 53 | |
| 54 | -// CloseableHttpResponse response = httpClient.execute(post); | |
| 55 | -// | |
| 56 | -// JSONObject json = JSONObject.parseObject(EntityUtils.toString(response.getEntity())); | |
| 57 | -// if(null != json && json.getInteger("errCode") == 0) | |
| 58 | -// code = 0; | |
| 59 | -// else | |
| 60 | -// logger.error("和网关http通讯失败,rs: " + json); | |
| 54 | + CloseableHttpResponse response = httpClient.execute(post); | |
| 55 | + | |
| 56 | + JSONObject json = JSONObject.parseObject(EntityUtils.toString(response.getEntity())); | |
| 57 | + if(null != json && json.getInteger("errCode") == 0) | |
| 58 | + code = 0; | |
| 59 | + else | |
| 60 | + logger.error("和网关http通讯失败,rs: " + json); | |
| 61 | 61 | }catch(Exception e){ |
| 62 | 62 | logger.error("", e); |
| 63 | 63 | }finally { | ... | ... |