You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 15The REST camp say you should use HTTP as defined in the HTTP spec. i.e. RFC2616 Nothing more, nothing less.Darrel Miller– Darrel Miller2010-04-12 01:12:56 +00:00Commented Apr 12, 2010 at 1:12
- 1@Darrel Referring ibm.com/developerworks/webservices/library/ws-restful: REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping: To create a resource on the server, use POST. To retrieve a resource, use GET. To change the state of a resource or to update it, use PUT. To remove or delete a resource, use DELETE.saille– saille2011-08-30 23:11:40 +00:00Commented Aug 30, 2011 at 23:11
- 6Sorry but that's just plain wrong. REST requires compliance to a uniform interface. If you are using HTTP then that uniform interface is defined in part by RFC 2616. In that spec, there is not a one-to-one mapping between create, read, update, and delete and the HTTP methods.Darrel Miller– Darrel Miller2011-08-31 00:09:31 +00:00Commented Aug 31, 2011 at 0:09
- 3GET and DELETE map pretty well to Read and Delete in CRUD, but using PUT/POST for Update and Create is not as straight-forward. See stackoverflow.com/questions/630453/put-vs-post-in-restdcstraw– dcstraw2011-10-12 22:53:09 +00:00Commented Oct 12, 2011 at 22:53
- 7Looking back at this 6 years later, and given that the question has been viewed ~100k times, I feel its worth putting in a small update. Darrel is correct according to Fielding's definition of REST (ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) - there is no mention of mapping HTTP verbs to CRUD. IBM's developer advice (link in comment above) reflects common practice in implementing RESTful API's, not Fielding's definition of REST.saille– saille2015-02-22 01:14:48 +00:00Commented Feb 22, 2015 at 1:14
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you