I created an application tha开发者_如何学Got 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'.
Are you using something like apache commons http. You can use post method.
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();
精彩评论