Re: REST and DELETE?

Jan Algermissen <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
Hi Dan,

On Aug 8, 2012, at 7:56 PM, Dan Stromberg wrote:

> 
> There's something I'm not getting about REST.
> 
> We're supposed to use HTTP verbs like GET, PUT, POST and DELETE.
> 
> But we're also supposed to be avoiding server state, like sessions.

Right. REST does not allow *session* state. All information about the state of the current application (the interacion that is going on between client and server)
must reside on the client. 

> 
> How can we have a stateless protocol (that is, a protocol in which all state is saved in the client, using the REST hierarchy as a sort of state machine), that supports a DELETE operation?

Of course you can have server side state. That is except for a few edge cases of purely-processor-like-resources (e.g. convert Word to PDF service) the whole point: to access and alter server side state. Just never store interaction state there - if you want to then make it a resource. A shopping cart[1] that is implemented as a resource would be such an example.


HTH

JAn

[1] Though the canonical shopping cart in REST would be a state bucket on the client that is filled during interactions and only submitted to the server at checkout, when the order is placed.


> 
> Are some HTTP verbs more RESTful than others?  It seems like PUT, POST and DELETE are all about storing state on the server.
> 
> Thanks!
> 
> 



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rest-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/rest-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.