Posted by jonathan_hunt on August 1, 2010 at 3:46am
REST Server module maps POST to Create and PUT to Update:
Create: POST /services/rest/node + body data
Retrieve: GET /services/rest/node/123
Update: PUT /services/rest/node/123 + body data
Delete: DELETE /services/rest/node/123
My reading of material such as RESTful Web Services (O'Reilly) is that PUT should be used for resource creation (where the client knows the URL for the resource).
Is there a way of achieving that mapping in REST Server 2.x?
Looking at the code, it would be good to make the $action_mapping in RESTServer.inc resolveController() pluggable.

Comments
PUT can be used for content
PUT can be used for content creation if you know the final URL - which you most likely don't in most cases.
If you're creating a node then the URL of the node will be decided by the node's id which is decided by the database. There is no way that a web service client can't reliably predict that id.
The case is a bit different with something like a view which have a unique machine name. If a view with the same machine name already exists then a PUT would just override it with the new view. But that might be bad if you have a name conflict and didn't want to delete the old view so not even then is a PUT necessarily the right choice.
I don't know if it's possible to create stuff through PUT with the REST Server 2+ - but most of the you wouldn't want that anyway and for all cases where you can't use PUT for creation a POST is the correct RESTful approach.
Post a feature request to the REST Server's issue queue if you want $action_mapping to be pluggable :) If you have a patch then that is even better ;)
If you're creating nodes
If you're creating nodes using an external id, then a PUT is the way to go. I expect quite a few users of services will want this. e.g.
/services/rest/ticket/12345As suggested, I've added a feature request at http://drupal.org/node/870676