DEV Community

Ramu
Ramu

Posted on

In `Representational State Transfer`, What does `State Transfer` exactly mean? Is my example in description is correct?

I am getting confused because of multiple views on the terms state transfer in REST

But what exactly state transfer means in REST?

Is it something like... If the resource is Weather report of NEWYORK city then each time it changes but when a client requests the server for the report of NY, it transfers the representation of that resource at the current STATE (I MEAN THE WEATHER AT THE CURRENT time?)

Or

Is it something like FORMAT OF THE RESOURCE in SERVER AND CLIENT? (I mean.. If the RESOURCE is a PNG IMAGE MAY BE BLOB FORMAT in DB(server-side) but to the clients, the format will be in PNG/JPG etc?) - if this is correct then it is just a representation right how we are saying it is state?

Please help me to understand what exactly STATE mean in REST.

Top comments (0)