Subject: [core] POST vs PUT in I-D coap-01

From: Olaf Bergmann <[email-masked]>
Date: Fri, 30 Jul 2010 14:55:46 +0200

Hi,

During the plugfest on Wednesday, I found that the text on the methods
POST and PUT in sections 2.3.2 and 2.3.3 is somewhat ambiguous (at least
to me).  I read this as POST is the method to create new resources that
are identified by the given request URI while PUT is used specifically
for modifying existing resources (as the creation of new resources is a
MAY in section 2.3.3).

I suppose the intention of POST and PUT is the very same as in sections
9.5 and 9.6 of RFC 2616?

Thanks,
Olaf

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 30 Jul 2010 15:18:25 +0200

> I suppose the intention of POST and PUT is the very same as in sections

It is my (personal) impression that we want to be compatible with that intention, except that we might want to listen to any insights that come out of the HTTPBIS process.

However, we should look at the places where HTTP is *not* well-defined and consider if we can make a more specific (and thus simpler to implement) decision here.  We do *not* have to support the full generality of HTTP here.

To me, the distinction between PUT and POST is this:

1) PUT can "update" an existing resource known by URI.
2) PUT can "create" a new resource where the client gets to choose the URI.
   (To make this operation idempotent, 2 and 1 are the same operation PUT.)
3) POST can "create" a new resource where the server gets to choose the URI, based on the URI given by the client that identifies the resource that is performing this creation.
4) POST can also be used to do random undefined RESTful and RESTless stuff.

I think 1 and 2 are pretty much well-understood.

The questions in my mind are:

a) how much do we need to support 4?  
   We need reasonable usecases for the cases we do want to support to make sure we have made the right decisions.
b) how to best support 3, given that this operation is not idempotent?
   E.g., One aspect that came up in the meeting was the support of the block protocol in POST.
c) in case 3, how is the chosen URI communicated?  (Assume: option like HTTP: Location:)

Gruesse, Carsten

---

From: "Simpson, Robby (GE Energy Services)" <[email-masked]>
Date: Fri, 30 Jul 2010 12:09:03 -0400

I would strongly recommend using the same semantics as 2616, but only the bits applicable to a RESTful interface (for instance, I think we could leave out the POST functionality for forms). 

In short, PUT for modifying a resource or creating at a specific URI and POST for creating a subordinate resource for a given URI or adding to a "list" at a given URI. 

- Robby

------------
Sent from my BlackBerry - thus the tpyos and brvty

----- Original Message -----
From: [email-masked] <[email-masked]>
To: [email-masked] <[email-masked]>
Cc: [email-masked] <[email-masked]>
Sent: Fri Jul 30 08:55:46 2010
Subject: [core] POST vs PUT in I-D coap-01

Hi,

Thanks,
Olaf
_______________________________________________
core mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/core