REST API design constraints
Having gone through the HTTP protocol’s nuts and bolts, we can start to analyze the REST API’s architectural style and constraints. This will act as a foundation for all further discussion on the design of REST APIs.
Out of all the API architectural styles available, REST and its derivatives are the most common. This means that it is also the most proven and battle-tested. A great example of a REST-like architecture that’s implemented on a large scale is the World Wide Web. Being created in 1992, it predates REST. You can think of the World Wide Web as a large-scale implementation of REST principles, using HTTP as its protocol and web browsers as clients. REST was abstracted from the World Wide Web’s architecture to describe a broader spectrum of applications, but using the World Wide Web as an example helps us reason about REST.
REST APIs were originally proposed by Roy Thomas Fielding in his 2000 doctoral dissertation...