1

I am sending variables to PHP though Java/Android by the HttpPost method. I need to debug some of the PHP values and return it back to Java. What is the best means of doing this?

Here is a tangible example:

I send in a Parameter through a NameValuePair. That goes to the HttpPost and then to PHP where it then goes through the conversion of $foo = $_POST['foo'].

What I want to do is return the value of $foo back into Java. Just the single String value, nothing more. Not an Array of any kind. Then I want to toast it so I can see in my emulator or device what value is being sent.

TheLettuceMaster
  • 15,594
  • 48
  • 153
  • 259

1 Answers1

-1

It's a little on the cumbersome side but if you have access to the server you're sending the request to you could load on Wireshark (http://www.wireshark.org/).

Filter the capture to the IP of your requesting Android device. Assuming you're just using HTTP (not HTTPS) you can just follow the stream and see the whole conversation (request and response).

barancw
  • 888
  • 9
  • 18
  • 1
    This solution does not provide debugging, it will just let you watch all the traffic being sent. If it's encoded its more work than its worth – KDEx Jun 20 '12 at 22:07