Representational State Transfer (REST) is basically an architectural style for the web. REST specifies a set of constraints. These constraints ensure that clients (service consumers and browsers) can interact with servers in flexible ways.
Let's first understand some common terminologies:
- Server: Service provider. Exposes services which can be consumed by clients.
- Client: Service consumer. Could be a browser or another system.
- Resource: Any information can be a resource: a person, an image, a video, or a product you want to sell.
- Representation: A specific way a resource can be represented. For example, the product resource can be represented using JSON, XML, or HTML. Different clients might request different representations of the resource.
Some of the important REST constraints are listed as follows:
- Client-Server: There should be a server (service provider...