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; } }