How to print out returned message from HttpResponse?

Posted by chobo2 on Stack Overflow See other posts from Stack Overflow or by chobo2
Published on 2010-04-03T23:41:11Z Indexed on 2010/04/03 23:43 UTC
Read the original article Hit count: 424

Filed under:
|
|
|

Hi

I have this code on my andriod phone.

   URI uri = new URI(url);
   HttpPost post = new HttpPost(uri);
   HttpClient client = new DefaultHttpClient();
   HttpResponse response = client.execute(post);

I have a asp.net webform application that has in the page load this

 Response.Output.Write("It worked");

I want to grab this Response from the HttpReponse and print it out. How do I do this?

I tried response.getEntity().toString() but it just seems to print out the address in memory.

Thanks

© Stack Overflow or respective owner

Related posts about .NET

Related posts about android