Loopj AsynHttpClient
ASP.Net
I am trying to connect to ASP.NET WebApp.
OnSuccess callback, i want to read the webpage and get text and data from the webpage. how can i get it or how can i parse it to the JSON or XML?
I successfully Connected to the site by posting params to the login page.Now i want to read redirected webpage.
and how can i save cookies or cache so it will automatically login when i run the Android APP.
client.get("https://uogis.uog.edu.pk/LandingPage.aspx", new AsyncHttpResponseHandler(){
@Override
public void onFailure(int arg0, Header[] arg1,
byte[] arg2, Throwable arg3) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(int arg0, Header[] arg1,
byte[] arg2) {
// TODO Auto-generated method stub
mTextView.setText("In Landing Page now");
}
@Override
public void onFinish() {
params.put("TextBox1","Home");
client.get("https://uogis.uog.edu.pk/ControlPanel.aspx",new AsyncHttpResponseHandler(){
@Override
public void onFailure(int arg0,
Header[] arg1, byte[] arg2,
Throwable arg3) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(int arg0,
Header[] arg1, byte[] arg2) {
// TODO Auto-generated method stub
mTextView.setText("In Control Panel\n"+ "ResponseCode "+arg0+ "\n" );
}});
}
});