Both PUT and POST requests have a strong connection with HTTP. Both have many resemblances and differences as well. This article includes some major differences between PUT and POST HTTP requests.
What is a PUT HTTP Request?
The PUT HTTP request method is used to revise or modify the resources obtainable on the server. Generally, it modifies the specific resource at the target URL with some other resources.
What is a POST HTTP Request?
The POST HTTP request method is used to add a resource to an existing group.
Difference between PUT and POST HTTP Request
|The PUT method is considered idempotent. In this method, if we send a request several times, it will be counted as a single request modification.
|The POST method is considered idempotent. In this method, if we send a request multiple times, then multiple URLs will get created on the servers.
|The PUT method is used to modify a single resource.
|The POST method is used to add a child resource.
|It can be cached.
|It cannot be cached.
|This method acts as specific.
|This method acts as an abstract.
|In the PUT method, we use the UPDATE query.
|In the POST method, we use a CREATE query.
|When it comes to the PUT method, the client finalises which URL resource should be updated.
|When it comes to the POST method, the server finalies which URL resource should be added.
Keep learning and stay tuned to BYJU’S to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2024, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cutoff, GATE Previous Year Question Paper, and more.