blob: c6c87d11ef4768b4a94d0acf3f4cfd760d04d256 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
---
title: DELETE
slug: Web/HTTP/Methods/DELETE
tags:
- HTTP
- HTTP method
- Reference
- Request method
translation_of: Web/HTTP/Methods/DELETE
original_slug: Web/HTTP/Méthode/DELETE
---
{{HTTPSidebar}}
La **méthode HTTP DELETE** supprime la ressource indiquée.
<table class="properties">
<tbody>
<tr>
<th scope="row">La requête a un corps</th>
<td>Non</td>
</tr>
<tr>
<th scope="row">Une réponse de succès a un corps</th>
<td>Non</td>
</tr>
<tr>
<th scope="row">{{Glossary("Sûre")}}</th>
<td>Non</td>
</tr>
<tr>
<th scope="row">{{Glossary("Idempotente")}}</th>
<td>Oui</td>
</tr>
<tr>
<th scope="row">{{Glossary("Peut être mise en cache")}}</th>
<td>Non</td>
</tr>
<tr>
<th scope="row">
Autorisée dans les
<a
href="https://developer.mozilla.org/fr/docs/Web/Guide/HTML/Formulaires"
>formulaires HTML</a
>
</th>
<td>Non</td>
</tr>
</tbody>
</table>
## Syntaxe
DELETE /file.html HTTP/1.1
## Exemple
### Requête
DELETE /file.html HTTP/1.1
### Réponses
Si une méthode `DELETE` est appliquée avec succès, il y a plusieurs codes de statut de réponse possibles :
- Un code de statut {{HTTPStatus("202")}} (`Accepted`) si l'action est en passe de réussir mais n'a pas encore été confirmée.
- Un code de statut {{HTTPStatus("204")}} (`No Content`) si l'action a été confirmée et qu'aucune information supplémentaire n'est à fournir.
- Un code de statut {{HTTPStatus("200")}} (`OK`) si l'action a été confirmée et que le message de réponse inclut une représentation décrivant le statut.
<!---->
HTTP/1.1 200 OK
Date: Wed, 21 Oct 2015 07:28:00 GMT
<html>
<body>
<h1>File deleted.</h1>
</body>
</html>
## Spécifications
| Spécification | Titre |
| -------------------------------------------- | ------------------------------------------------------------- |
| {{RFC("7231", "DELETE", "4.3.5")}} | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
## Voir aussi
- HTTP status: {{HTTPStatus("200")}}, {{HTTPStatus("202")}}, {{HTTPStatus("204")}}
|