admin
2021-03-18 b37275dba6b782bf3bb3817c4504f6cdef1bef7c
src/main/java/com/yeshi/buwan/util/HttpUtil.java
@@ -36,6 +36,22 @@
      return "";
   }
   public static String defaultGet(String url) {
      HttpClient client = new HttpClient();
      GetMethod method = new GetMethod(url);
      try {
         client.executeMethod(method);
         method.getStatusCode();
         return method.getResponseBodyAsString();
      } catch (HttpException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return "";
   }
   public static String get(String url, Map<String, String> map) {
      HttpClient client = new HttpClient();
      // client.getHostConfiguration().setProxy("192.168.1.122", 8888);
@@ -88,6 +104,7 @@
   public static InputStream getAsInputStream(String url) {
      HttpClient client = new HttpClient();
      client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
      GetMethod method = new GetMethod(url);
      try {
         client.executeMethod(method);