The REST Constraints in Depth
Client-server: UI concerns and data concerns are separated.
Stateless: Every request contains the information required to process it. The server does not rely on conversational session state stored between requests.
Cacheable: Responses explicitly or implicitly indicate whether they may be cached.
Uniform interface: Resources are identified consistently, representations are transferred, messages are self-descriptive, and hypermedia can drive application state.
Layered system: A client does not need to know whether it is communicating directly with the origin server or through proxies, gateways, CDNs, and other intermediaries.
Code-on-demand: Servers may optionally transfer executable code to clients. This constraint is optional.
Each request is self-containedResponses can be cachedIntermediaries are allowedConsistent interaction model