response-*
请求参数,那么该请求操作不支持匿名请求,必须携带签名。GET /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
名称 | 描述 | 类型 | 是否必选 |
response-cache-control | 设置响应中的 Cache-Control 头部的值 | string | 否 |
response-content-disposition | 设置响应中的 Content-Disposition 头部的值 | string | 否 |
response-content-encoding | 设置响应中的 Content-Encoding 头部的值 | string | 否 |
response-content-language | 设置响应中的 Content-Language 头部的值 | string | 否 |
response-content-type | 设置响应中的 Content-Type 头部的值 | string | 否 |
response-expires | 设置响应中的 Expires 头部的值 | string | 否 |
versionId | 当启用版本控制时,指定要下载的版本 ID,如不指定则下载对象的最新版本 | string | 否 |
名称 | 描述 | 类型 | 是否必选 |
Range | RFC 2616 中定义的字节范围,范围值必须使用 bytes=first-last 格式且仅支持单一范围,不支持多重范围。first 和 last 都是基于0开始的偏移量。 例如 bytes=0-9,表示下载对象的开头10个字节的数据;bytes=5-9,表示下载对象的第6到第10个字节。此时返回 HTTP 状态码206(Partial Content)及 Content-Range 响应头部。 如果 first 超过对象的大小,则返回 HTTP 状态码416(Requested Range Not Satisfiable)错误。如果不指定,则表示下载整个对象 | string | 否 |
If-Modified-Since | 当对象在指定时间后被修改,则返回对象,否则返回 HTTP 状态码为304(Not Modified) | string | 否 |
If-Unmodified-Since | 当对象在指定时间后未被修改,则返回对象,否则返回 HTTP 状态码为412(Precondition Failed) | string | 否 |
If-Match | 当对象的 ETag 与指定的值一致,则返回对象,否则返回 HTTP 状态码为412(Precondition Failed) | string | 否 |
If-None-Match | 当对象的 ETag 与指定的值不一致,则返回对象,否则返回 HTTP 状态码为304(Not Modified) | string | 否 |
x-cos-traffic-limit | 针对本次下载进行流量控制的限速值,必须为数字,单位默认为 bit/s。限速值设置范围为819200 - 838860800,即100KB/s - 100MB/s,如果超出该范围将返回400错误 | integer | 否 |
名称 | 描述 | 类型 |
Cache-Control | RFC 2616 中定义的缓存指令,仅当对象元数据包含此项或通过请求参数指定了此项时才会返回该头部 | string |
Content-Disposition | RFC 2616 中定义的文件名称,仅当对象元数据包含此项或通过请求参数指定了此项时才会返回该头部 | string |
Content-Encoding | RFC 2616 中定义的编码格式,仅当对象元数据包含此项或通过请求参数指定了此项时才会返回该头部 | string |
Content-Range | RFC 2616 中定义的返回内容的字节范围,仅当请求中指定了 Range 请求头部时才会返回该头部 | string |
Expires | RFC 2616 中定义的缓存失效时间,仅当对象元数据包含此项或通过请求参数指定了此项时才会返回该头部 | string |
x-cos-meta-* | 包括用户自定义元数据头部后缀和用户自定义元数据信息 | string |
x-cos-storage-class | 对象存储类型,枚举值请参见 存储类型 文档,例如 MAZ_STANDARD、MAZ_STANDARD_IA、INTELLIGENT_TIERING、MAZ_INTELLIGENT_TIERING、STANDARD_IA、ARCHIVE、DEEP_ARCHIVE。仅当对象不是标准存储(STANDARD)时才会返回该头部 | enum |
x-cos-storage-tier | 当对象的存储类型为智能分层存储时,该头部表示对象所处的存储层,有效值:FREQUENT、INFREQUENT。 | enum |
名称 | 描述 | 类型 |
x-cos-version-id | 对象的版本 ID | string |
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:35:16 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511316;1586518516&q-key-time=1586511316;1586518516&q-header-list=date;host&q-url-param-list=&q-signature=1bd1898e241fb978df336dc68aaef4c0acae****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 16Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 09:35:16 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Last-Modified: Fri, 10 Apr 2020 09:35:05 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNkZDRfZDgyNzVkNjRfN2Q5M18xOWVi****[Object Content]
GET /exampleobject?response-content-type=application%2Foctet-stream&response-cache-control=max-age%3D86400&response-content-disposition=attachment%3B%20filename%3Dexample.jpg HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:35:17 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511317;1586518517&q-key-time=1586511317;1586518517&q-header-list=date;host&q-url-param-list=response-cache-control;response-content-disposition;response-content-type&q-signature=4fcea9f80bc67fe475dff746eca0b9abff6a****Connection: close
HTTP/1.1 200 OKContent-Type: application/octet-streamContent-Length: 16Connection: closeAccept-Ranges: bytesCache-Control: max-age=86400Content-Disposition: attachment; filename=example.jpgDate: Fri, 10 Apr 2020 09:35:17 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Last-Modified: Fri, 10 Apr 2020 09:35:05 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNkZDVfNjZjODJhMDlfMTY2MDdfMThm****[Object Content]
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 29 Jul 2020 06:51:49 GMTIf-None-Match: "ee8de918d05640145b18f70f4c3aa602"Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1596005509;1596012709&q-key-time=1596005509;1596012709&q-header-list=date;host;if-none-match&q-url-param-list=&q-signature=20e39095b9f22ae1279bec2a3375b527c32d****Connection: close
HTTP/1.1 304 Not ModifiedContent-Type: image/jpegContent-Length: 0Connection: closeDate: Wed, 29 Jul 2020 06:51:49 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWYyMTFjODVfOGZiNzJhMDlfNDcxZjZfZDY2****
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 29 Jul 2020 06:51:50 GMTIf-Match: "aa488bb80185a6be87f4a7b936a80752"Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1596005510;1596012710&q-key-time=1596005510;1596012710&q-header-list=date;host;if-match&q-url-param-list=&q-signature=1437a0d094c4e0f8e26909d35b2cca83dcbf****Connection: close
HTTP/1.1 412 Precondition FailedContent-Type: application/xmlContent-Length: 480Connection: closeDate: Wed, 29 Jul 2020 06:51:50 GMTServer: tencent-cosx-cos-request-id: NWYyMTFjODZfOGRjOTJhMDlfMmIyMWVfOTJl****<?xml version='1.0' encoding='utf-8' ?><Error><Code>PreconditionFailed</Code><Message>Precondition not match.</Message><Resource>examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobject</Resource><RequestId>NWYyMTFjODZfOGRjOTJhMDlfMmIyMWVfOTJl****</RequestId><TraceId>OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTdjMDczODYwZjM5YTU3ZmZmOWI5MmY4NjkxY2I3MGNiNjkyOWZiNzUxZjg5MGY2OWU4NmI0YWMwNTlhNTExYWU=</TraceId></Error>
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:00 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511360;1586518560&q-key-time=1586511360;1586518560&q-header-list=date;host&q-url-param-list=&q-signature=6f9ec1af1aa86abd5b484b41ae1378850ad2****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 16Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 09:36:00 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Last-Modified: Fri, 10 Apr 2020 09:35:49 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMDBfMzdiMDJhMDlfYTgyNl8xNjA2****x-cos-server-side-encryption: AES256[Object Content]
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:11 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511371;1586518571&q-key-time=1586511371;1586518571&q-header-list=date;host&q-url-param-list=&q-signature=bdadbe917a50feeb8dddf8c75642be172720****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 16Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 09:36:11 GMTETag: "840af7c921f4b3230049af8663145bd0"Last-Modified: Fri, 10 Apr 2020 09:36:01 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMGJfZGEyNzVkNjRfZDgxY18xYTBj****x-cos-server-side-encryption: cos/kmsx-cos-server-side-encryption-cos-kms-key-id: 48ba38aa-26c5-11ea-855c-52540085****[Object Content]
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:23 GMTx-cos-server-side-encryption-customer-algorithm: AES256x-cos-server-side-encryption-customer-key: MDEyMzQ1Njc4OUFCQ0RFRjAxMjM0NTY3ODlBQkNERUY=x-cos-server-side-encryption-customer-key-MD5: U5L61r7jcwdNvT7frmUG8g==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511383;1586518583&q-key-time=1586511383;1586518583&q-header-list=date;host;x-cos-server-side-encryption-customer-algorithm;x-cos-server-side-encryption-customer-key;x-cos-server-side-encryption-customer-key-md5&q-url-param-list=&q-signature=7da5c304f9439df949b6550ab23aea67a5f0****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 16Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 09:36:23 GMTETag: "582d9105f71525f3c161984bc005efb5"Last-Modified: Fri, 10 Apr 2020 09:36:12 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMTdfNzBiODJhMDlfZTVmMV8xNDAy****x-cos-server-side-encryption-customer-algorithm: AES256x-cos-server-side-encryption-customer-key-MD5: U5L61r7jcwdNvT7frmUG8g==[Object Content]
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 12:30:02 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586521802;1586529002&q-key-time=1586521802;1586529002&q-header-list=date;host&q-url-param-list=&q-signature=51b3c33f4cfae5d7b31ad61a974db7374f39****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 26Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 12:30:02 GMTETag: "22e024392de860289f0baa7d6cf8a549"Last-Modified: Fri, 10 Apr 2020 12:29:52 GMTServer: tencent-cosx-cos-hash-crc64ecma: 11596229263574363878x-cos-request-id: NWU5MDY2Y2FfMzFiYjBiMDlfMjE2NzVfMTgz****x-cos-version-id: MTg0NDUxNTc1NTE5MTc1NjM4MDA[Object Content Version 2]
GET /exampleobject?versionId=MTg0NDUxNTc1NjIzMTQ1MDAwODg HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:45 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511405;1586518605&q-key-time=1586511405;1586518605&q-header-list=date;host&q-url-param-list=versionid&q-signature=31aeb69334b973ef7406300a182de0645c91****Connection: close
HTTP/1.1 200 OKContent-Type: image/jpegContent-Length: 16Connection: closeAccept-Ranges: bytesDate: Fri, 10 Apr 2020 09:36:45 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Last-Modified: Fri, 10 Apr 2020 09:36:35 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMmRfNzBiODJhMDlfZTYwZl8xM2Fh****x-cos-version-id: MTg0NDUxNTc1NjIzMTQ1MDAwODg[Object Content]
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 12:32:37 GMTRange: bytes=8-14Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586521957;1586529157&q-key-time=1586521957;1586529157&q-header-list=date;host;range&q-url-param-list=&q-signature=719273479357f4b4b4c7d4f5ceb631753101****Connection: close
HTTP/1.1 206 Partial ContentContent-Type: image/jpegContent-Length: 7Connection: closeAccept-Ranges: bytesContent-Range: bytes 8-14/16Date: Fri, 10 Apr 2020 12:32:37 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Last-Modified: Fri, 10 Apr 2020 12:32:25 GMTServer: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDY3NjVfY2VjODJhMDlfOWVlZl8xNmMy****Content
GET /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 26 Dec 2019 11:57:24 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1577361444;1577368644&q-key-time=1577361444;1577368644&q-header-list=date;host&q-url-param-list=&q-signature=d975dc7097b2dbffcf2ba001e6dec25dd80a****Connection: close
HTTP/1.1 403 ForbiddenContent-Type: application/xmlContent-Length: 513Connection: closeDate: Thu, 26 Dec 2019 11:57:24 GMTServer: tencent-cosx-cos-request-id: NWUwNGEwMjRfZDcyNzVkNjRfNjZlM183Zjcx****x-cos-storage-class: ARCHIVE<?xml version='1.0' encoding='utf-8' ?><Error><Code>InvalidObjectState</Code><Message>The operation is not valid for the object storage class.</Message><Resource>examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobject</Resource><RequestId>NWUwNGEwMjRfZDcyNzVkNjRfNjZlM183Zjcx****</RequestId><TraceId>OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjNjIyOGVlZmJlNDg4NDQ1MzAzMjA2ZDg4OGQ3MDhlMjIzYjI1ZWUwODY5YjdlMTBjY2EwNTgyZWMyMjc0Mjc=</TraceId></Error>
本页内容是否解决了您的问题?