zhouzh 3 年之前
父節點
當前提交
ed0e1c08da
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/steerinfo/dil/util/HTTPRequestUtils.java

+ 1 - 1
src/main/java/com/steerinfo/dil/util/HTTPRequestUtils.java

@@ -47,7 +47,7 @@ public class HTTPRequestUtils {
         //指定报文头【Content-type】、【User-Agent】
 //        httpPost.setHeader("Content-type", "application/x-www-form-urlencoded");
         httpPost.setHeader("Content-type", "application/json");
-        httpPost.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
+        httpPost.setHeader("-UserAgent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
 
         //执行请求操作,并拿到结果(同步阻塞)
         CloseableHttpResponse response = client.execute(httpPost);