Applicable Scenario
You can directly initiate a request to get objects in Cloud Object Storage (COS). The following features are supported in getting objects:
Download a complete object: Download the complete object data by initiating a GET request.
Download a part of an object: Use the
Rangerequest header in a GET request to retrieve a specific range of bytes of an object. Retrieving multiple ranges is not supported.
The object's metadata will be returned along with the object's content as an HTTP response header. The GET request supports overwriting part of the metadata values in the response using URL parameters, for example, the response value ofContent-Disposition. The response headers that can be modified include the following:Content-Type
Content-Language
Expires
Cache-Control
Content-Disposition
Content-Encoding
Usage Instructions
Using the REST API
You can directly use the REST API to initiate a request to get an object. See the GET Object documentation for details.
Using Java SDKs
COS supports AWS Java SDK. See Using AWS S3 SDK to Access COS to access COS, and operate according to the GET Object section in the official documentation of AWS Java SDK 2.20.0.