瀏覽代碼

fix score

he2802 2 年之前
父節點
當前提交
3581dddc3e
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      zhongzheng-common/src/main/java/com/zhongzheng/common/utils/http/HttpUtils.java

+ 6 - 1
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/http/HttpUtils.java

@@ -486,7 +486,12 @@ public class HttpUtils
         return post(url, httpPost, encoding, new DataParse<String>() {
             @Override
             public String parseData(HttpEntity httpEntity, String encoding) throws IOException {
-                return EntityUtils.toString(httpEntity, encoding);
+                if(Validator.isNotEmpty(httpEntity)){
+                    return EntityUtils.toString(httpEntity, encoding);
+                }else{
+                    return null;
+                }
+
             }
         });
     }