Suggest an editImprove this articleRefine the answer for “What is DELETE used for?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**DELETE** is an **HTTP method** used to **delete a resource on the server**. In simple terms, DELETE is needed to tell the server: "delete this object". **Key point:** DELETE is considered an idempotent method because a repeated call gives the same result: the resource is already gone.Shown above the full answer for quick recall.Answer (EN)Image**DELETE** is an **HTTP method** used to **delete a resource on the server**. In simple terms: **DELETE is needed to tell the server: "delete this object"**. --- ## The main purpose of DELETE DELETE is used when you need to: - delete a record (a user, an order, a file) - delete a resource at a specific URL - remove an object from the system The typical meaning of DELETE: > "Delete the resource located at this address" --- ## How DELETE works 1. The client sends an HTTP request with the **DELETE** method 2. The URL specifies **exactly what needs to be deleted** 3. The server: - finds the resource - deletes it (or marks it as deleted) 4. The server returns an HTTP response Usually **no request body is needed**, all the information is in the URL. --- ## A key property of DELETE ### Idempotency DELETE is considered **idempotent**: - the first request: the resource is deleted - a repeated DELETE: the same result (the resource is simply already gone) This matters for an API's reliability. --- ## DELETE vs POST (briefly) - **POST** - create or perform an action - **DELETE** - delete a resource DELETE always **works on a specific resource**. --- ## What the server returns after DELETE Possible options: - `200 OK` - the deletion was performed - `204 No Content` - deleted, but with no response body - `404 Not Found` - the resource was not found All of them are **normal responses**. --- ## Real-life example DELETE is like: - removing a contact from a phone - erasing a file - cancelling an order You are **removing an object**, not changing it. --- ## Short answer for an interview Remember this wording: > **DELETE is used to delete a resource on the server and is an idempotent HTTP method.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.