Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Object moved</title>
- </head>
- <body>
- <h2>Object moved to <a href="/GradebookSummary.aspx">here</a>.
- </h2>
- </body>
- </html>
- OkHttpClient client = new OkHttpClient().newBuilder()
- .followRedirects(false)
- .followSslRedirects(false)
- .build();
- MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
- RequestBody body = RequestBody.create(mediaType, "checkCookiesEnabled=true&checkMobileDevice=false&checkStandaloneMode=false&checkTabletDevice=false&portalAccountUsername=username&portalAccountPassword=password");
- Request request = new Request.Builder()
- .url("https://hac.chicousd.org/LoginParent.aspx?page=GradebookSummary.aspx")
- .post(body)
- .addHeader("content-type", "application/x-www-form-urlencoded")
- .addHeader("cache-control", "no-cache")
- .build();
- Response response = client.newCall(request).execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement