What is HTTP PUT Methods ?

The PUT method is an HTTP request method uses by client to send data to a server. It commonly used to update a existing data or create a new data if doesn’t exists.

What is HTTP PUT Methods ?

  1. Updates a resources: A PUT requests commonly used to updates a resources. For example a Admin sends a PUT requests to server with new user information john/458, the server will update user with ID 458.
  2. Creating a resources: In some case if ID 458 doesn’t exists server will create a new user. Generally developers uses PUT method to updates resources but it can also be use to create a new user if user doesn’t exists.
  3. Responses in PUT: When a user sent data through PUT request to update a existing resources, it return status code 200 ( OK ), and it return status code 204( No Content) if resources not updated. It will return status code 201( Created ) if new resources created.
  4. Request Body: Resources get includes in body of request if the data transmission medium use PUT method. This data contains details about resources. In PUT method bodyof request conatins full representations of the resources, even if only small part is going to update.


Follow on:
Sunil Shaw

Sunil Shaw

About Author

I am a Web Developer, Love to write code and explain in brief. I Worked on several projects and completed in no time.