android - How to see the actual HttpPost request being sent -
there bugs in code , can't figure out it's happening exactly.
my code looks this...
data.add(firstname); data.add(lastname); data.add(email); data.add(country); data.add(currency); data.add(phone); string result; // results of http execution try { urlencodedformentity entity = new urlencodedformentity(data); httppost.setentity(entity); httpresponse response = httpclient.execute(httppost);
the request not getting response expect (i.e. 1 when use curl.
i'd see exact request httpclient
making. there way this?
you can print request details follows:
httppost post = new httppost(); post.getallheaders(); post.getmethod(); // post or request post.getparams(); // returns params post.geturi(); // current uri called
once response,
response.getallheaders(); httpresponse.getstatusline().getstatuscode(); // response status
Comments
Post a Comment