Posted by jonathan_hunt on August 1, 2010 at 8:49am
2 followers
Jump to:
| Project: | REST Server |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
From http://groups.drupal.org/node/84189
It would be good to make the $action_mapping in RESTServer.inc resolveController() pluggable. For example, the current implementation forces PUT to be used to update, but PUT should be available for creation when the id can be specified by the REST client.
Comments
#1
Thinking about this - why can't you just use the update method for both creation and updating? Within that method you can check whether the thing that should be created already exists and if it does you can update it instead.
I can see no specific gain in making this part of the REST Server pluggable - it's much easier if each resource makes use of what's already there.