You know GET (read) and POST (create). Now let's complete the CRUD cycle. PUT replaces, PATCH updates partially, DELETE removes. With these five methods, you can test any REST API endpoint.
PUT says "here's the complete new version of this resource — replace everything." You MUST send all fields. Any field you skip gets wiped.
New tab, select PUT from the dropdown
URL: https://jsonplaceholder.typicode.com/posts/1
Body tab > raw > JSON
Paste the full object (all fields)
Click Send — expect 200 OK
// PUT https://jsonplaceholder.typicode.com/posts/1
// Body — FULL object (all fields required):
{
"id": 1,
"title": "Updated Title via PUT",
"body": "This replaces the entire post content",
"userId": 1
}
// Response (200 OK):
{
"id": 1,
"title": "Updated Title via PUT",
"body": "This replaces the entire post content",
"userId": 1
}PATCH says "just change these specific fields, leave everything else alone." You only send the fields you want to update.
// PATCH https://jsonplaceholder.typicode.com/posts/1
// Body — only the field you want to change:
{
"title": "Only the Title Changed"
}
// Response (200 OK):
{
"userId": 1,
"id": 1,
"title": "Only the Title Changed",
"body": "quia et suscipit..."
}See the difference? With PATCH, the body field stayed intact. With PUT, you'd have to send the body field too — or it gets wiped.
DELETE is simple. Point it at a resource, and it's gone. No body needed.
DELETE https://jsonplaceholder.typicode.com/posts/1
Response: {} (empty body)
Status: 200 OK
(Some APIs return 204 No Content instead of 200)Do this full cycle right now. Each step builds on the previous one:
POST /posts — Create a new post. Note the returned id.
GET /posts/{id} — Read the post you just created.
PUT /posts/{id} — Replace it with completely new content. Send all fields.
PATCH /posts/{id} — Change only the title.
GET /posts/{id} — Verify your PATCH worked. Only the title should be different.
DELETE /posts/{id} — Delete the post.
GET /posts/{id} — Try reading it again. What happens?
Remember, JSONPlaceholder is a fake API. It simulates responses but doesn't actually save data. Your POST won't really create anything, and your DELETE won't really delete. Don't panic if GET still returns data after DELETE — that's expected with this practice API.
Q: What is the difference between PUT and PATCH?
A: PUT replaces the entire resource. You must send all fields — any missing field becomes null. PATCH updates only the fields you send — everything else stays unchanged. Example: if a user has name, phone, email and you PUT with just name and email, phone gets nulled. With PATCH, phone stays. In practice, most teams use PATCH for updates because it's safer and sends less data.
Q: What HTTP methods have you used for CRUD operations?
A: Create uses POST — it sends data in the body to create a new resource and returns 201 Created. Read uses GET — retrieves data without changing anything. Update uses PUT (full replace) or PATCH (partial update) — both return 200 OK. Delete uses DELETE — removes the resource and returns 200 or 204 No Content. Together these four operations cover every data manipulation in REST APIs.
Key Point: PUT replaces everything. PATCH changes specific fields. DELETE removes. Complete the full CRUD cycle on every resource you test.