On 25/07/07, Mark Baker <[EMAIL PROTECTED]> wrote: > > > > > > > On 7/25/07, Steve Jones <[EMAIL PROTECTED]> wrote: > > > > So are POST and DELETE therefore not RESTful as it doesn't make sense > to perform those actions on every potential resource? > > Why doesn't it make sense? > > I think you and I have been over this before. IIRC, you suggested it > wouldn't make sense for a rock to accept POST. But I don't see any > problem with it, as it could be used to, for example, spray paint the > POSTed document onto the rock, or move it, or whatever.
But its perfectly acceptable (in a REST system) to not allow POST and just have PUT, with POST returning an error code. Now you could argue that this is still "uniform" in that its available, but its not uniform in terms of behaviour. > > And DELETE doesn't mean delete the *thing*, it means delete any > representations of the thing. All things have representations, so it > makes sense for the same reason GET makes sense. But not for those resources where its illegal (and I mean illegal) to remove them (think Enron and shredding). It is not always valid to delete something, either in terms of the physical thing or a representation of it. As more and more elements are electronic only the resource is often the only reference of its existence. As an example lots of ordering systems don't have a cancel ability, if you mis-ordered 100 widgets then you order -100 widgets in compensation. If the argument is that even if the operation isn't valid that it is RESTful because its available to be called (and fail) that doesn't sound overly uniform in terms of the semantics of the operation. Steve > > Mark. > -- > Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca > Coactus; Web-inspired integration strategies http://www.coactus.com >
