I want to connect at login form. I send informations for connections. The problem, after identification, the website do a redirection and when i test my Object HttpsURLConnection with method connection.getResponseCode(), i have code 302 (HTTP Status-Code 302: Temporary Redirect.)
- how can use my object connection for get html code after redirection?
How can use my connetion for navigate in all site after connection?
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setDoOutput(true); connection.setRequestMethod("POST"); request.write("login=ll&password=pp"); request.flush(); request.close(); String line = ""; InputStreamReader isr = new InputStreamReader(connection.getInputStream()); //.... get string
thx for your answer :)