http post and get methods of popular interpretation
Create a new record, just use post,
update a record on the use of words put.
————————
POST is used to submit the data. The data submitted in the body of the HTTP request, the object is to submit data and for storing the server without allowing the user to change too much the corresponding data (mainly with respect to a lot of trouble to modify the url).
PUT operation is idempotent. The so-called idempotent means that no matter how many operations, the results are the same. For example, I used to modify PUT an article, and then doing the same operation, the result of each operation is no different.
POST operation is neither safe nor idempotent, such as common POST repeated loading problem: When we sent the same POST request multiple times, the result is to create a number of resources.
Meaning safe and idempotent that: when the operation does not achieve the desired objectives, we can not stop retried without resources have side effects. In this sense, POST operations tend to be harmful, but often still have to use it.
Another point to note is that you can use to create operations POST, PUT can be used, the difference is that POST action on a set of resources (/ articles), and PUT operations are in effect on a specific resource (/ articles / 123),
then popular point that, if the URL can be determined at the client, then use PUT, if it is determined at the server, then use POST,
for example, a lot of resources using a database auto-increment primary key as identification information, and create identification information of resources in the end what can only be provided by the server, this time it must use POST.