uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
uc.getOutputStream().write((param + "&csrf=" + csrf).getBytes("UTF-8"));
uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
uc.getOutputStream().write((param + "&csrf=" + csrf).getBytes("UTF-8"));
}
public static String executeBasicWebInteraction(String cookie, String path, String query, int formIndex) throws IOException, MalformedURLException, UnsupportedEncodingException {
}
public static String executeBasicWebInteraction(String cookie, String path, String query, int formIndex) throws IOException, MalformedURLException, UnsupportedEncodingException {
- URLConnection uc = post(cookie, path, query, formIndex);
+ HttpURLConnection uc = post(cookie, path, query, formIndex);
+ if (uc.getResponseCode() == 302) {
+ return null;
+ }