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

你可能感兴趣的:(java)