The last version of the Simple HTTP Request example had the issue of running the request on the same thread as the UI of our applications. This is a no-no in Android and has actually become harder to do with a recent version of Android (it gives an error).
The version below shows a similar HTTP Request being called when a button is pressed but instead of just the HTTP Request code being run in the onClick method, it is run in an AsyncTask which is in effect another thread.