该操作可以从OSS中取回Object,您必须对该Object有READ权限。如果该Object权限为公有读,则可在不进行签名认证的情况下取回Object。
注:支持通过x-amz-customize-back-source-url、x-amz-customize-back-source-param头指定数据拉取,指定后下载该对象时,将会拉取请求头提供的URL数据,并返回给用户。
GET /ObjectName HTTP/1.1 Host: <bucket>.s3.<region>.jcloudcs.com Date: <date> Authorization: <authorization string> (see Authenticating Requests (AWS Signature Version4)) Range:bytes=<byte_range>
无请求参数
除了共用的请求Header之外,该操作的实现还可以使用以下请求头,请求Header大小不超过8KB。
名称 | 描述 | 必须 |
---|---|---|
Range | 指定字节范围下载Object Type: String Default: None Constraints: None |
否 |
If-Modified-Since | 若Object在指定时间后修改,则返回该Object,否则返回304(not modified) Type: String Default: None Constraints: None |
否 |
If-Unmodified-Since | 若Object在指定时间后未修改,则返回该Object,否则返回412(precondition failed)。 Type: String Default: None Constraints: None |
否 |
If-Match | 如果ETag与指定的相同,则返回该Object,否则返回412(precondition failed)。 Type: String Default: None Constraints: None |
否 |
IF-None-Match | 如果ETag与指定的不同,则返回该Object,否则返回304(not modified)。 Type: String Default: None Constraints: None |
否 |
x-amz-customize-back-source-url | 回源地址,支持如 http://www.example.com:1000/path 格式。 Type:String Default:None |
否 |
x-amz-customize-back-source-param | base64编码的json字符串。参数同镜像回源设置。 Type:String Default:None |
否 |
注意:
名称 | 描述 |
---|---|
x-amz-storage-class | 提供Object的存储类型信息。非标准存储情况下,OSS将会返回该Header |
x-amz-restore | 该对象的还原信息及副本生命周期 |
无响应元素
GET /my-image.jpg HTTP/1.1 Host: oss-example.s3.<region>.jcloudcs.com Date: Mon, 3 Oct 2016 22:32:00 GMT Authorization: <authorization string>
HTTP/1.1 200 OK x-amz-request-id: 318BC8BC148832E5 Date: Mon, 3 Oct 2016 22:32:00 GMT Last-Modified: Wed, 12 Oct 2009 17:50:00 GMT ETag: "fba9dede5f27731c9771645a39863328" Content-Length: 434234 [434234 bytes of object data]