Why use PUT methods?
本问题已经有最佳答案,请猛点这里访问。
使用POST似乎没有任何优势。 是否存在PUT更好/更快/更安全/其他方式的特定情况? 当你可以使用POST基本上完成相同数量的工作时,为什么有人会编写一个全新的http方法?
来自RFC2616:
The fundamental difference between the POST and PUT requests is
reflected in the different meaning of the Request-URI. The URI in a
POST request identifies the resource that will handle the enclosed
entity. That resource might be a data-accepting process, a gateway to
some other protocol, or a separate entity that accepts annotations. In
contrast, the URI in a PUT request identifies the entity enclosed with
the request -- the user agent knows what URI is intended and the
server MUST NOT attempt to apply the request to some other resource.