zhouzh 3 lat temu
rodzic
commit
ed0e1c08da

+ 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);