[erlang-questions] Rest wrong, Append instead of PUT?
Tue Mar 18 10:21:51 CET 2008
I'm working on some REST project and I agree with you. We use POST for
CREATE (aka append to some collection) and append operations, but PUT only
for UPDATE (aka replace existing resource). We are not using use case PUT on
non exists URI aka CREATE so we have it as allowed design if need.
On Tue, Mar 18, 2008 at 8:52 AM, bryan rasmussen <rasmussen.bryan@REDACTED>
> Well the problem is probably more PUT, PUT has three possible uses,
> CREATE, APPEND, UPDATE:
> 1. PUT a resource for the first time on the server. Thus matching
> CREATE in a CRUD operation.
> 2. PUT using Content-Range: to append to the end of a resource.
> 3. PUT new version of resource on the server. Thus matching UPDATE in
> a CRUD operation.
> However these usages are not specified as such - IIRC they are
> implicit not explicit - thus a particular REST system could specify
> 1. PUT a resource for the first time on the server, disallow other uses of
> 2. POST an update on any resource, disallow uses of PUT to append or
> personally I don't think there is a problem (theoretically) with
> specifying PUT with Content-Range to append, and specifying that if a
> resource exists you can only put to it with a Content-Range, and the
> method to calculate what ranges are allowed. However it is sort of low
> level to have to be doing that kind of thing.
> Bryan Rasmussen
> On Tue, Mar 18, 2008 at 6:27 AM, Matthew Dempsky <matthew@REDACTED>
> > On 3/17/08, Joe Armstrong <erlang@REDACTED> wrote:
> > > Email is pretty much like Erlang. Pid ! X appends X to Pid's message
> > > just like mailing to somebody@REDACTED
> > POST seems perfectly suited for this. Pid becomes a URI, and X
> > becomes the request entity.
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> erlang-questions mailing list
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions