Delete Object

2022-09-21 13:30:56

Delete Object 用于删除某个 object。

请求语法

DELETE /bucket-name/object HTTP/1.1
Host: s3-us-east-1.ossfiles.com
Date: GMT Date
Content-Length: 0
Authorization: SignatureValue

细节分析

  1. 如果要删除的 Object 不存在或者 Bucket 不存在,返回 404 key not found。

示例

请求示例:

DELETE /test212/1.txt HTTP/1.1
Authorization: AWS4-HMAC-SHA256 Credential=6a19c6de088ff32ff663287eec8f3b85/20220420/us-east-1/s3/aws4_request,SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=c5a64ec9065851bc579d2ccc2ab2a8365a07c732577bd42204ae96516b53c0fe
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20220420T091641Z
Host: s3-us-east-1.ossfiles.com
Content-Length: 0

返回示例:

HTTP/1.1 204 No Content
Date: Wed, 20 Apr 2022 09:16:37 GMT
Connection: keep-alive