Basics of REST
Representational State Transfer (REST) is an architectural style for creating web services. REST is not a standard, but it defines a set of constraints defined by Roy Fielding. The six constraints are as follows:
- Stateless: The server doesn't hold any information about the client state.
 - Client: The client and server act independently. The server does not send any information without a request from the client.
 - Cacheable: Many clients often request the same resources; therefore, it is useful to cache responses in order to improve performance.
 - Uniform interface: Requests from different clients look the same. Clients may include, for example, a browser, a Java application, and a mobile application.
 - Layered system: REST allows us to use a layered system architecture.
 - Code on demand: This is an optional constraint.
 
The uniform interface is an important constraint, and it means that every REST architecture should have the following elements:
- Identification of resources...