admin
2019-11-05 bc3a51600e5b950b8042e13c2fc5e4aa943ffc29
utils/src/main/java/org/yeshi/utils/HttpUtil.java
@@ -583,4 +583,25 @@
      return result;
   }
   /**
    * 获取post返回location
    * @param url
    * @return
    */
   public static String getLocation(String url) {
      HttpClient client = new HttpClient();
      PostMethod method = new PostMethod(url);
      try {
         client.executeMethod(method);
            return method.getResponseHeader("location").getValue();
      } catch (HttpException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return null;
   }
}