WHAT YOU WILL LEARN IN THIS CHAPTER
- How to connect to the web using HTTP
- How to consume XML web services
- How to consume JSON web services
- How to connect to a Socket server
Finally, this chapter also demonstrates how to write an Android application to connect to servers using TCP sockets. Using sockets programming, you can write sophisticated, interesting networked applications.
CONSUMING WEB SERVICES USING HTTP
One common way to communicate with the outside world is through HTTP. HTTP is no stranger to most people; it is the protocol that drives much of the web’s success. Using the HTTP protocol, you can perform a wide variety of tasks, such as downloading web pages from a web server, downloading binary data, ...