Header Ads

Http Post and Http Put Method Explained

What is Http Post : HTTP POST request is a method of sending data to a server to create or update a resource on that server. In this request, data is sent in the body of the request rather than as a parameter in the URL.

The HTTP POST request is typically used for submitting forms, sending user data, uploading files, and performing other similar actions. When a client sends an HTTP POST request, it includes a request header and a request body. 

The header specifies the HTTP method being used (POST), the URL of the resource to be created or updated, and other relevant metadata. The body of the request contains the data that needs to be sent to the server. 

The server processes the request and returns an HTTP response code to indicate whether the request was successful or not. If the request was successful, the server may also return additional data, such as a confirmation message or a resource identifier. Overall, HTTP POST requests are a crucial part of the communication between a client and a server, allowing for the creation and updating of resources on the server through the sending of data in the request body. 

What is Http Put : HTTP PUT is an HTTP method that is used to update an existing resource on a server. It is similar to the HTTP POST method in that it also sends data in the request body to the server. 

However, the key difference between the two methods is that PUT is used to modify an existing resource, whereas POST is used to create a new resource. When a client sends an HTTP PUT request, it includes a request header and a request body. 

The header specifies the HTTP method being used (PUT), the URL of the resource to be updated, and other relevant metadata. The body of the request contains the data that needs to be sent to the server to update the resource. 

 The server processes the request and returns an HTTP response code to indicate whether the request was successful or not. If the request was successful, the server may also return additional data, such as a confirmation message or the updated resource. Overall, the HTTP PUT method is an important part of the HTTP protocol and is commonly used for updating resources on a server, such as files, documents, or databases. 

Please find the screenshot below explained Http POST and Http PUT

No comments:

Powered by Blogger.