DELETE

DELETE Method

Subject to authorization, the HTTP DELETE method works in Pagelove as per the HTTP specification.

When a selector range unit is used alongside the DELETE method, if the requested node is present in the document then it is removed from the document, along with all of its descendent nodes.

DELETE /index.html HTTP/2
Range: selector=p:last-child

If the HTTP request is successful, the client receives a 204 No Content message back from the server. The response headers will include a Content-Range header that indicates the element that has been removed with the Content-Range header.

HTTP/2 204 No Content
Content-Range: selector=p:last-child

If the request refers to a resource that doesn't exist, a 404 Not Found is returned. If the resource exists, but the CSS selector is invalid, a 416 Range not Satisfiable message is sent.