The difference between POST and PUT is that PUT requests are idempotent(幂等的). That is, calling the same PUT request multiple times will always produce the same result. In contrast, calling a POST request repeatedly have side effects of creating the same resource multiple times.
新建一条记录用post
更新一条记录用put
example: