Back to Backend

What do GET, POST, PUT, PATCH, and DELETE mean in REST-style APIs?

These verbs are conventions on top of HTTP. GET is usually for reads and should not change important server state. POST often creates or triggers actions with a body. PUT commonly replaces a resource, PATCH partially updates, DELETE removes. Real APIs mix styles, but in interviews you should show you understand idempotency (repeating the same request with the same effect) and that GET is cacheable in ways POST usually is not.

GET /api/users/42
POST /api/users
PUT /api/users/42
PATCH /api/users/42
DELETE /api/users/42

Start simple: try this concept in a tiny project before moving to advanced tools.

httprestapi

Want to check this topic right now?

Check this question