The REST principle
Remote Function Call (RFC) 2616 (https://www.ietf.org/rfc/rfc2616.txt) defines a set of principles for building HTTP and Uniform Resource Identifier (URI) standards. Today's REST is based on these principles. In a nutshell, these principles can be understood as follows:
- Everything is a resource: All the data on the Internet has a format to describe by
content-type. - All the resources are identifiable by a unique identifier: Each resource is accessible via the URI (Uniform Resource Identifier) and is identified uniquely.
- Resources can be manipulated by standard
HTTPmethods: RFC 2616 defines eightHTTPverbs:GET,POST,PUT,DELETE,HEAD,OPTIONS,TRACE, andCONNECT. - Resources have multiple formats and can be created in different representations: Resources can be created in XML format or JSON format. In our project, we prefer the JSON format.
The HTTP verbs and HTTP response status code
We are going to use the first four of the most commonly used HTTP verbs for Create, Read...