HTTP supports not only post and get methods, but also options, delete, head, put, Trace, connect, and other methods,
Here are some introductions:
Http://tinyliu.info/2011/01/get/
Http://tinyliu.info/2011/01/post/
Http://tinyliu.info/2011/01/put/
Http://tinyliu.info/2011/01/head/
Http://tinyliu.info/2011/01/options/
This statement also describes idempotent methods for HTTP request operations,Idempotence means that no matter how many operations are performed, the results are the same. Put, get, and delete are idempotent, and post is not.
For more information, see
Http://macrochen.iteye.com/blog/678683
Generally, get, put, delete, and post methods are used in the rest method.
In tornado, the reserved
DefGet (self, * ARGs ,**Kwargs ):RaiseHttperror( 405)DefPost (self, * ARGs ,**Kwargs ):RaiseHttperror( 405)DefDelete (self, * ARGs ,**Kwargs ):RaiseHttperror( 405)DefPut (self, * ARGs ,**Kwargs ):RaiseHttperror (1, 405)
Therefore, the above four methods are supported.
therefore, in the CRUD operation, a new content is usually added using post, and the content is updated using put. Delete and get are unnecessary.