- Home
- API Design
- What Is The HTTP DELETE Reques ...

HTTP DELETE request method, delete all the current representations of the target resource given by URI. The HTTP DELETE method is used to delete a resource from the server.
The HTTP DELETE method is often used in REST APIs to delete resources. This method is idempotent, which means that multiple identical requests will have the same effect as a single request.
DELETE /demo.html HTTP/1.1
Here is an example of an HTTP DELETE request:
DELETE /demo.html HTTP/1.1 Host: apitier.com Content-type: text/html Content-length: 30 <h1>APITier</h1> <p>Highly Scalable API Platform</p>
If a DELETE method is successfully applied, there are several response status codes possible:
Indicates that the request has been received but not completed yet. It is typically used in log running requests and batch processing.
The server has fulfilled the request but does not need to return a response body. The server may return the updated meta information.
Indicates that the request has succeeded.
HTTP/1.1 200 OK
Content-type: text/html
Content-length: 30
Date: Mon, 14 Nov 2022 08:18:00 GMT
<html>
<body>
<h1>Demo File deleted.</h1>
</body>
</html>| Safe | No |
| Idempotent | Yes |
| Cacheable | No |
| Can have a body | Yes |