Difference between PUT and POST in REST Web Services in Java - Example
If you remember REST WebServices uses HTTP methods to map CRUD (create, retrieve, update, delete) operations to HTTP requests. Even though both PUT and POST methods can be used to perform create and update operations in REST WebServices, Idempotency is the main difference between PUT and POST. Similar to the GET request, the PUT request is also idempotent in HTTP, which means it will produce the same results if executed once more multiple times. Another practical difference between PUT and POST methods in the context of REST WebService is that POST is often used to create a new entity, and PUT is often used to update an existing entity.
تعليقات
إرسال تعليق