httpclient重定向Cookie设置

HttpClient client = new HttpClient();
GetMethod methodget = new GetMethod("xxxxx");
methodget.setFollowRedirects(true);
methodget.getParams().setParameter(HttpMethodParams.SINGLE_COOKIE_HEADER, true);
client.executeMethod(methodget);

相关推荐