DELETE - HTTP 编辑
The HTTP DELETE
request method deletes the specified resource.
Request has body | May |
---|---|
Successful response has body | May |
Safe | No |
Idempotent | Yes |
Cacheable | No |
Allowed in HTML forms | No |
Syntax
DELETE /file.html HTTP/1.1
Example
Request
DELETE /file.html HTTP/1.1
Responses
If a DELETE
method is successfully applied, there are several response status codes possible:
- A
202
(Accepted
) status code if the action will likely succeed but has not yet been enacted. - A
204
(No Content
) status code if the action has been enacted and no further information is to be supplied. - A
200
(OK
) status code if the action has been enacted and the response message includes a representation describing the status.
HTTP/1.1 200 OK Date: Wed, 21 Oct 2015 07:28:00 GMT <html> <body> <h1>File deleted.</h1> </body> </html>
Specifications
Specification | Title |
---|---|
RFC 7231, section 4.3.5: DELETE | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
Browser compatibility
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.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论