What is idempotent operation
Idempotent, in programming and mathematics, is a property of some operations such that no matter how many times you execute them, you achieve the same result. In programming, idempotent can be a property of many different code elements, including functions, methods, requests and statements. Idempotent is a language-agnostic property: It means the same thing in any programming context. Here’s a simple demonstration of idempotent in HTTP requests: HTTP GET requests are a method of retrieving specified data from a source, such as getting a bank account balance. GET requests are idempotent: Accessing the same data should always be consistent. On the other hand, POST requests are designed to change the target, such as adding a sum to a bank account. As such, a POST request should change the result and that means it’s not idempotent. In computing, an idempotent operation is one that has no additional effect if it is called more than once with the same input parameters. For example, removing