I am sending a request to a webservice along with a string as a parameter using POST method.
For Example:-
HttpPost httpPost = new HttpPost(http://www.google.com/gmail/getpictures.php);//sample URL (not working)
I am also sending a string along with web service URL
tmp = new StringEntity(data,"UTF-8");//data is any string
tmp.setContentEncoding(new BasicHeader("Content-type", "application/json"));
httpPost.setEntity(tmp);
I send the request using
response = httpClient.execute(httpPost);
I want to print what is inside the httpPost object, to know if I am sending the right data to the server.
HttpPost.toString() is not working for me. Anyone know how to retrive httpPost object into a string so that I can print it on LOGCAT?
you need to getContent from response.
now read data from rd.