tags:

views:

28

answers:

2

I created an application that parses content of secured areas of one webpage after account information input. It used GET method for loging in, so it was quite simple, I just used URL to log in. Now it was changed to POST method and I wonder how to log in to that site? The login form uses 2 input tags of type text with names 'login' and 'pass'.

+2  A: 

Have you tried setting the request method?

HttpURLConnection conn = new HttpURLConnection(url);
conn.setRequestMethod("POST");
OutputStream os = conn.getOutputStream();
os.write(...);
Object content = conn.getContent();
David Grant
+2  A: 

Are you using something like apache commons http. You can use post method.

saugata