Put happens to be idempotent, in contrast to post. Can i use a put method in an html form to send data from the form to a server? The difference between post and put is that put is idempotent, that means, calling the same put request multiple times will always produce the same result (that is no side effect), while on the other hand, calling a post request repeatedly may have (additional) side effects of creating the same resource multiple times. I was wondering what people's opinions are of a restful put operation that returns nothing (null) in the response body. Below is the comparison between them Submits a partial modification to a resource.
Since put requests include the entire entity, if you issue the same request repeatedly, it should always have the same outcome (the data you sent is now the entire data of the entity) Using put wrong what happens if you use the above patch data in a put request? Put and patch methods are similar in nature, but there is a key difference But what is the definition of 'enclosed entity'? When i run it in local, every thing works correctly But when i publish the application to the server, these methods do not work
The spec refers to the content as the enclosed entity, but a request with no content would have no enclosed entity, and therefore nothing to put on the server Unless, of course, you wanted to put nothing onto the server, in which case you'd probably want a delete.
WATCH