3 ms·
you shouldn't need to do session handling if you are going REST. Rest is all about not having state. If you need authentication, authenticate on every request.
by pilif 16y ago
you shouldn't need to do session handling if you are going REST. Rest is all about not having state. If you need authentication, authenticate on every request. If your request needs some additional info to give a response, pass that information in when sending the request.
It's really a different paradigm and sometimes it can get really painful to move away from the way of thinking that we are used to.
- roder 16y agoI realize that you don't want to maintain state in a REST api. It's not that it's painful to do something I'm use too (ie: session handling), it's just its painful implementing. My point was that I totally agree with the notion of a REST-based service, but it's easier from an implementation perspective to have have web-heads for views (static files, session handling, etc) that interact with the application (REST) server.