Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- URL url = new URL("https://student.psu.ru/pls/stu_cus_et/stu.login");
- HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
- String params = "p_redirect=stu.teach_plan&p_username="+URLEncoder.encode(login, "windows-1251")+"&p_password="+password;
- connection.setRequestMethod("POST");
- connection.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
- wr.writeBytes(params);
- wr.flush();
- wr.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement