🌐PUT Request
Also known as PUT, HTTP PUT, PUT Method
A request that swaps the whole thing for the one you send.
Think of it like
Think of it like a binder. You swap a whole page for a new one.
Example
Jack sends a PUT with his full profile: name, email and city. The server swaps the old profile for this one.
Why it matters
PUT gives a clear, repeatable way to save a whole record. Retrying it cannot make a mess.
Definition
Example code
http
PUT /api/users/42 HTTP/1.1
Content-Type: application/json
{"name": "Jack", "city": "Leeds"}Common mistake
Key takeaways
- 1Replaces the whole thing. Send every field.
- 2Same result twice. Safe to retry.
- 3Not for small edits. PATCH is for those.