Die Request-Methode HTTP DELETE löscht die angegebene Ressource.
Request hat einen Körper | Kann |
---|---|
Erfolgreiche Response hat Körper | Kann |
Safe | Nein |
Idempotent | Ja |
Cacheable | Nein |
In HTML Formularen erlaubt | Nein |
Syntax
DELETE /file.html HTTP/1.1
Beispiel
Request
DELETE /file.html HTTP/1.1
Responses
Bei erfolgreicher Anwendung einer DELETE
-Methode sind mehrere Antwortzustandscodes möglich:
- Einen
202
(Akzeptiert
) Statuscode, wenn die Aktion wahrscheinlich erfolgreich sein wird, aber noch nicht durchgeführt wurde. - Einen
204
(Kein Inhalt
) Statuscode, wenn die Aktion durchgeführt wurde und keine weiteren Informationen zu liefern sind. - Einen
200
(OK
) Statuscode, wenn die Aktion ausgeführt wurde und die Antwortnachricht eine Darstellung enthält, die den Status beschreibt.
HTTP/1.1 200 OK Date: Wed, 21 Oct 2015 07:28:00 GMT <html> <body> <h1>File deleted.</h1> </body> </html>
Spezifikationen
Specification | Title |
---|---|
RFC 7231, Abschnitt 4.3.5: DELETE | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
Browser Kompatibilität
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.