DELETE - HTTP 编辑

The HTTP DELETE request method deletes the specified resource.

Request has bodyMay
Successful response has bodyMay
SafeNo
IdempotentYes
CacheableNo
Allowed in HTML formsNo

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

SpecificationTitle
RFC 7231, section 4.3.5: DELETEHypertext Transfer Protocol (HTTP/1.1): Semantics and Content

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:73 次

字数:3365

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文