🚀 Level up your web & programming skills!
🔔 Subscribe to Ram N Java on YouTubeWhat Is the HTTP PUT Method?
When you build or interact with web applications, communication happens between a client (such as your web browser) and a server (the system hosting the application or website).
The HTTP PUT method is specifically designed to send data to a server to either create a brand-new resource or completely replace/update an existing resource at a specific URL.
How HTTP PUT Works Behind the Scenes
Whenever a PUT request is sent to the target server:
- If the resource already exists: The server overwrites and updates that target file or record with the payload you sent.
- If the resource does not exist: The server creates the new resource at the specified location.
Sample HTTP PUT Request & Response
A typical HTTP PUT request contains a request line, headers, an empty line separator, and the request payload:
PUT /hello.htm HTTP/1.1
Host: www.ramnjava.blogspot.com
Content-Type: text/html
Content-Length: 35
<html><body>Hello World</body></html>
If the resource did not exist previously and was created successfully, the server replies with a status code of 201 Created:
HTTP/1.1 201 Created
Date: Mon, 10 Mar 2026 12:00:00 GMT
Content-Location: /hello.htm
Related Tutorials You Might Enjoy
Click here to watch in Youtube : https://www.youtube.com/watch?v=Xd5cDT6SMi8
Click the below Image to Enlarge
| HTTP Method - PUT |
| HTTP Method - PUT |
| HTTP Method - PUT |
No comments:
Post a Comment