Search code examples
javaandroidhttphttpconnection

HTTP Connection explanation required


I was using sockets to connect my android application to a server for sending messages. I am now trying to use an HTTP connection. The problem is, which one, and what must appear (HttpClient, HttpPost etc...), I have seen dozens of examples and I am struggling to understand them. I have heard the phrase handshake and all of the buzz words get, post... etc, but havent grasped at which point each is occouring.

I am simply asking for a basic insight into how an http connection is formed and then how we use the methods to send and recieve.

Thanks for any advice.

Simon


Solution

  • This example shows a lot about getting (XML) data from the web.
    Here is a reference to the DefaultHttpClient that is used in that example.

    There is also a working downloadable eclipse project on the website ( 1st link )

    Good luck with your project!