Skip to content
BENIBIX Learn

PUT vs PATCH

A PUT request replaces the whole thing on the server with the full copy you send. A PATCH request changes only the fields you send. A PUT that leaves out a field may wipe it, while a PATCH leaves it alone.

Infrastructure🌐 Networking

PUT Request

A request that swaps the whole thing for the one you send.

A PUT request replaces a whole thing on the server with the version you send. You send every field, and whatever you leave out may be wiped. If the thing does not exist yet, some servers create it. Sending the same PUT twice leaves the same result as sending it once. That makes it safe to retry after a network error.

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.
Full entry
Infrastructure🌐 Networking

PATCH Request

A web request that changes only part of a thing. You send just the changes.

A PATCH request changes only part of a thing on the server. You send just the fields you want to change, and the rest stays as it was. That makes requests smaller than a PUT, which sends the whole thing. Whether sending the same PATCH twice is safe depends on how it is written. Setting a field is safe to repeat; adding one to a counter is not.

Example
Lucy changes her city in an app. It sends a PATCH with only the city, and her name and email stay the same.
Why it matters
Small edits stay small. Two people who edit different fields do not undo each other.
Full entry

In one line

PUT Request
A request that swaps the whole thing for the one you send.
PATCH Request
A web request that changes only part of a thing. You send just the changes.