
NO REST SYNONYM FREE
REST statelessness means being free from the application state.

We refer to it as resource representation. It is what we get as a response from the server as the API response. Resource state is the current state of a resource on a server at any point in time – and it has nothing to do with the interaction between client and server. Both are completely different things.Īpplication state is server-side data that servers store to identify incoming client requests, their previous interaction details, and current context information. It is important to understand the between the application state and the resource state. Thus each request MUST be stand alone and should not be affected by the previous conversation that happened with the same client in past. Provide authentication credentials with each request. To enable clients to access these stateless APIs, it is necessary that servers also should include every piece of information that the client may need to create/maintain the state on its side.įor becoming stateless, do not store even authentication/authorization details of the client. If any such information is important then the client will send that as part of the current request. The server never relies on information from previous requests from the client. When the client makes an HTTP request, it includes all information necessary for the server to fulfill the request. Statelessness means that every HTTP request happens in complete isolation. There should not be any session affinity or sticky session between the client and the server. This also means that the client is responsible for sending any state information to the server whenever it is needed.

The client is responsible for storing and handling the session related information on its own side. The application’s session state is therefore kept entirely on the client.

The server cannot take advantage of any stored context on the server. This restriction is called Statelessness.Įach request from the client to the server must contain all of the necessary information to understand the request. As per the REST (REpresentational “State” Transfer) architecture, the server does not store any state about the client session on the server-side.
