blob: d2a40a8ea95f6fc213b6c3ca0b0acf0d017598d1 (
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
89
90
91
92
93
|
---
title: DELETE
slug: Web/HTTP/Méthode/DELETE
tags:
- HTTP
- HTTP method
- Reference
- Request method
translation_of: Web/HTTP/Methods/DELETE
---
<div>{{HTTPSidebar}}</div>
<p>La <strong>méthode HTTP DELETE</strong> supprime la ressource indiquée.</p>
<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>
<h2 id="Syntaxe">Syntaxe</h2>
<pre class="syntaxbox">DELETE /file.html HTTP/1.1
</pre>
<h2 id="Exemple">Exemple</h2>
<h3 id="Requête">Requête</h3>
<pre>DELETE /file.html HTTP/1.1</pre>
<h3 id="Réponses">Réponses</h3>
<p>Si une méthode <code>DELETE</code> est appliquée avec succès, il y a plusieurs codes de statut de réponse possibles :</p>
<ul>
<li>Un code de statut {{HTTPStatus("202")}} (<code>Accepted</code>) si l'action est en passe de réussir mais n'a pas encore été confirmée.</li>
<li>Un code de statut {{HTTPStatus("204")}} (<code>No Content</code>) si l'action a été confirmée et qu'aucune information supplémentaire n'est à fournir.</li>
<li>Un code de statut {{HTTPStatus("200")}} (<code>OK</code>) si l'action a été confirmée et que le message de réponse inclut une représentation décrivant le statut.</li>
</ul>
<pre>HTTP/1.1 200 OK
Date: Wed, 21 Oct 2015 07:28:00 GMT
<html>
<body>
<h1>File deleted.</h1>
</body>
</html></pre>
<h2 id="Spécifications">Spécifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Spécification</th>
<th scope="col">Titre</th>
</tr>
<tr>
<td>{{RFC("7231", "DELETE", "4.3.5")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
</tr>
</tbody>
</table>
<h2 id="Voir_aussi">Voir aussi</h2>
<ul>
<li>HTTP status: {{HTTPStatus("200")}}, {{HTTPStatus("202")}}, {{HTTPStatus("204")}}</li>
</ul>
|