4 ms·
He didn't go over the common example of paging by including nav { prev: '...', next: '....'} in the response. But, the thing that always concerns me about
by latch 15y ago
He didn't go over the common example of paging by including
nav { prev: '...', next: '....'}
in the response. But, the thing that always concerns me about this is that it requires the client to maintain state. If you consume such a web service in a web app, and the user hits "next", you'll have to have stored the next url somewhere.
- icebraining 15y agoIf you want to show any content to the user, you'll always need to hold it in memory somewhere; that's inevitable. Storing an URL for an action is just part of the rest. Personally, I'd just use a closure and bind it immediately to the event handler of the UI element.
- Argorak 15y agoIsn't the whole point of REST/Hypermedia that the client holds the state instead of the server?