# PUT Request

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

**Field:** Infrastructure  
**Category:** Networking  
**Also known as:** PUT, HTTP PUT, PUT Method

## Think of it like

Think of it like a binder. You swap a whole page for a new one.

## Definition

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.

## Example code

```http
PUT /api/users/42 HTTP/1.1
Content-Type: application/json

{"name": "Jack", "city": "Leeds"}
```

The whole user record is sent, and it replaces the old one.

## Why it matters

PUT gives a clear, repeatable way to save a whole record. Retrying it cannot make a mess.

## Common mistake

Sending a PUT with only the field you changed. The other fields may be blanked out.

## Three principles

- **Replaces the whole thing.** Send every field.
- **Same result twice.** Safe to retry.
- **Not for small edits.** PATCH is for those.

## Related terms

- [PATCH Request](https://learn.benibix.com/term/infrastructure/patch-request)
- [HTTP Method](https://learn.benibix.com/term/infrastructure/http-method)
- [POST Request](https://learn.benibix.com/term/infrastructure/post-request)
- [Idempotency](https://learn.benibix.com/term/development/idempotency)

## Told apart from

- [PUT vs PATCH](https://learn.benibix.com/compare/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.

## Taught in

- [HTTP Methods: GET vs POST](https://learn.benibix.com/learn/infrastructure-networking/http-methods-get-vs-post): Computer Networking, 10/13

---

Source: https://learn.benibix.com/term/infrastructure/put-request
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
