-1

I need to pass data to my URL to get the data.

I have done like this...

document= Jsoup.connect("MYURL").data("PASSCODE", "001100").post();
System.out.println(document);

but I am not getting proper output

Need help. I have check this Links also This and this also.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Android
  • 8,995
  • 9
  • 67
  • 108

1 Answers1

1

Usually login into a web site requires two steps:

  1. You send a get request to get the page, and you extract from there some values like session ID etc, and the cookies.
  2. You send a post request with the values from step 1, and your user name and password.

To know which values you need to send, use your browser in the developer mode (by pressing F12) and examine the traffic.

If you want to write an android app, change the user agent string to match your browser, since some sites send different pages to different clients.

You can see an example HERE.

Community
  • 1
  • 1
TDG
  • 5,909
  • 3
  • 30
  • 51