On Dec 29, 2004, at 6:47 AM, Josh Sled wrote:
> As per HTTP, POST has two meanings ... "submit data-block for
> data-handling" as well as "resource {creation,annotation,extension}".
> These represent very different designs; I still think it's critical to
> distinguish the two. But, yes, they're "levels of HTTP", not "levels
> of
> REST".
Yes, it was certainly a mistake when the NCSA team introduced HTML
forms processing via POST (which at the time meant the same as NNTP's
post)
without introducing a distinctive method for "process this". However,
we
should also understand why it did not seem important at the time, and
also why it "just doesn't matter" to REST how many meanings are embodied
in HTTP's POST.
visible identifiable
method safe idempotent semantics resource cacheable
-----------------------------------------------------------
GET | X X X X X |
HEAD | X X X X X |
PUT | X X X |
POST(a) | / |
POST(p) | |
OPTIONS | X X X O |
-----------------------------------------------------------
POST(a), as "append this", is unsafe, non-idempotent, non-cacheable,
operates on an unknown resource, and has only minor visibility since
there is no way for an intermediary to anticipate the state of the
resource after the append aside from "some state was added". POST(p),
as "process this", doesn't even have that minor visibility. Thus, an
architectural style like REST can only improve the performance of a
POST-based architecture by finding ways to escape POST (e.g., 201).
Note that POST, regardless of which meaning is being used, has none of
the characteristics that would make it useful for the architecture to
know exactly what is going on. At most, we can obtain an identifiable
resource if the response is 201 and Content-Location, but that is true
of any extension method. That is why it is more efficient in a true
REST-based architecture for there to be a hundred different methods
with distinct (non-duplicating), universal semantics, than it is to
include method semantics within the body of a POST. Inspecting message
bodies to determine message semantics will always be slower than
placing the method up front.
I really should extend the table to include all of the methods that
webdav has added, just to show how disastrous it was to create PROP*
(duplicating semantics) instead of linking to the set of properties
as a separate resource. Maybe someone else has time to add that to the
wiki.
Hi Group, I'm very new to REST but am interested in moving my current development effort into the model. That said, I must confess I need some clarification...
... POST is more general than create, and in fact even PUT can create a resource. "create", AFAICT, emerged from the desire for some to fit the new "uniform...
... It's hard to say generally, but I think you're seeing two different things: * an inherent similarity in the two methods, including a bit of a semantic...
... Josh, while that may be your theory (and you are welcome to it), the notion that there are two levels of REST is completely false. There are different...
... No, you're right; I've made the mistake of conflating REST with HTTP. ... As per HTTP, POST has two meanings ... "submit data-block for data-handling" as...
... Yes, it was certainly a mistake when the NCSA team introduced HTML forms processing via POST (which at the time meant the same as NNTP's post) without...
... PROPFIND, PROPPATCH, LOCK, and UNLOCK do not have identifiable resources (they all operate by way of a third party). Is PROPPATCH always idempotent? COPY...
... Could you please expand on what you mean by "they operate by way of a third party" (is this about the Depth request header?)? For instance, the results for...
... That wasn't what I meant, though depth is certainly another can of worms. I guess that is another reason why PROPFIND is not cacheable. I meant that the...
... Correct. RFC2518 already specifies PROPFIND as non-cacheable. ... Ah! Now that depends on whether one considers those properties as different resources (as...
Julian Reschke wrote: [...] ... Does anyone happen to know why the functionality of PROPFIND has not simply been enabled by the definition of a set of...
... Extensibility of header names? Internationalization considerations? Namespace operations? Updates of properties? Anyway, this: "WebDAV and the Birth of...
... Yeah, Yaron's twisted little view of history. It would be more accurate to say that some people insisted HTTP could not carry internationalized data in ...
... OK, another interesting read is in Jim Whitehead's and Yaron Goland's "The WebDAV Property Design" "<http://www.cs.ucsc.edu/~ejw/papers/spe-whitehead.pdf>....
Thanks for the clarification. I have two questions. ... Do you agree that it would be better if human user agents sending HTML forms just put the contents of...
... [deletia] ... I continue to be confused, though. I understand the importance of orthogonality of operations [generally], but there's a tension here ...
I agree with your general point Roy, but just had a comment on something you said ... ... I was under the impression that the degree of visibility in both...
... They are effectively the same, yes, but visibility is a continuous function. Just knowing something about the intent of the client may be better than...
... I haven't found a reason to use PUT rather than POST for creating a new resource. I'm still waiting for the killer example where it makes sense. Using PUT...
... When using PUT, the client application knows and identifies the resource that is to be replaced by the content in the request. Whether the server creates...
... When using PUT, the client is in control of the URI space. So take any PUT enabled file-system based Web server (like Apache) and it becomes a 'dumb ...
Josh, ... POST can't have two meanings per the spec., because the spec does not define a way to discriminate two meanings for POST. Or do I fail to get your...
... Every time I read RFC 2616 section 9.5, I come away with two meanings: * process data * "subordinate [...] in the same way that a file is subordinate to a...