Idempotent (idempotent, idempotence) is the concept of an abstract algebra. In a computer, it can be understood that a power-like operation is characterized by the effect that any number of executions have on the same effect as one execution at a time.
When the post is requested, the server creates a file each time, but it simply updates the put method instead of recreating it. So the put is idempotent.
To give a simple example, if there is a blog system to provide a Web API, the pattern is so http://superblogging/blogs/post/{blog-name}, very simple, will {Blog-name} replaced with our blog name, To send an HTTP put or POST request to this URI, the body part of HTTP is the blog post, which is a very simple rest API example. Should we use the Put method or the Post method? Depending on whether the behavior of this rest service is idempotent, what is the server side behavior if we send two http://superblogging/blogs/post/Sample requests? If there are two blog posts, it means that the service is not idempotent, because the use of multiple uses has a side effect, if the latter request to overwrite the first request, then the service is idempotent. In the former case, the Post method should be used, and in the latter case, the put method should be used.
Refer:http the difference between the Put method and the Post method
The difference between the HTTP put method and the Post method