🌐DELETE Request
Also known as DELETE, HTTP DELETE, DELETE Method
The web request that wipes out the thing at an address.
Think of it like
Think of it like asking a shop to take one thing off the shelf.
Example
Jack deletes an old blog post. His app sends DELETE /api/posts/17, and the server answers 204.
Why it matters
With a clear delete method, servers can check who may remove what. It also keeps deletes out of GET links.
Definition
Example code
http
DELETE /api/posts/17 HTTP/1.1
Host: example.comCommon mistake
Key takeaways
- 1Removes a thing. Named by the address.
- 2Usually no body. The address is enough.
- 3Same result twice. It is already gone.