Let's take a REST
Before we look at the interface, we need to understand what REST is. In its simplest terms, REST is a set of six constraints, which when applied to an architecture (such as a web service) gives the basis of the RESTful style.
While it is outside the scope of this book to look at the architecture, there are many very good websites that cover what REST is. As far as we're concerned, we are interested in communicating with the web service.
REST services are typically transmitted using HTTP's GET
and POST
methods and return data in plain XML.
POST and GET
The best way to think about the difference between POST
and GET
is to consider a standard mail. If you have something to send, you POST
it. If you receive something, you GET
it.
So far, it's easy
When we receive the information from the server, it is typically in XML. This is a plain text format in a serialized format (which is a form of formatting that takes the objects being sent by the server and creates a plain text inline list...