Commit b6430a24766871f8cd3ea249a679a16615a6b1bc

Authored by 潘钊
1 parent 70c9e61b

http code 200

src/main/java/com/bsth/data/directive/GatewayHttpUtils.java
... ... @@ -46,6 +46,13 @@ public class GatewayHttpUtils {
46 46  
47 47 response = httpClient.execute(post);
48 48  
  49 + int statusCode = response.getStatusLine().getStatusCode();
  50 + if(statusCode != 200){
  51 + post.abort();
  52 + logger.error("http client status code: " + statusCode);
  53 + return code;
  54 + }
  55 +
49 56 JSONObject json = JSONObject.parseObject(EntityUtils.toString(response.getEntity()));
50 57 if (null != json && json.getInteger("errCode") == 0)
51 58 code = 0;
... ...