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
Content-type: text/html
Content-length: 30

<p>Highly Scalable API Platform</p>


If a DELETE method is successfully applied, there are several response status codes possible:

202 – Accepted

Indicates that the request has been received but not completed yet. It is typically used in log running requests and batch processing.

202 – No Content

The server has fulfilled the request but does not need to return a response body. The server may return the updated meta information.

200 -OK

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

    <h1>Demo File deleted.</h1>


Can have a bodyYes

Get more information about HTTP Status Codes