Reputation: 2621
I'm implementing a web service by RESTFul API.
How to make the same instance available to many webservice calls, and keep in memory the new status of this instance?
Let's consider we have an object Obj1 (having as attributes Id and Rank) and many webservice calls : call1 for method increment(), call2 for method getRankeValue()...
Let's suppose that (Obj1.Rank==0) was equal to true, and let's suppose that call1 has done Obj1.Rank++.
How can we make call2 say that (Obj1.Rank==1) was equal to true?
Thank you a lot.
Upvotes: 0
Views: 470
Reputation: 6570
Create a method that generates a unique token and use in all other method calls, so the server can keep track of state.
Upvotes: 1