android - Clarification needed for HTTP redirect -


could me out this:

i getting 200(success) instead of 302(re-direct) http response, getting 2 instead of 3 cookie headers response. how allow re-directs ? input nice.

my code is:

defaulthttpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(url); try {     httppost.setparams(new basichttpparams().setparameter("a", "b"));     httppost.setparams(new basichttpparams().setparameter("c", "d"));     httppost.setparams(new basichttpparams().setparameter("e", "f"));     httppost.setparams(new basichttpparams().setparameter("g", "h"));     httppost.setparams(new basichttpparams().setparameter("i", "j"));     httppost.setparams(new basichttpparams().setparameter("k", "l"));     httppost.setparams(new basichttpparams().setparameter("m", bundle.getstring("responsedata")));      urlencodedformentity formentity = new urlencodedformentity(postparameters);     httppost.setentity(formentity);     httpresponse sessionresp = httpclient.execute(httppost);      header[] headers = sessionresp.getallheaders();     (int i=0; < headers.length; i++) {         header h = headers[i];         log.i(tag, "header names: "+h.getname());         log.i(tag, "header value: "+h.getvalue());     }     log.i("sucess: ", sessionresp.getstatusline().getstatuscode()+""); 


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -