Response Result of GET Object
Type Definition
type GetObjectOutput struct
Parameter Description
| Field | Type | Description |
|---|---|---|
| StatusCode | int | HTTP status code |
| RequestId | string | Request ID returned by the OBS server |
| ResponseHeaders | map[string][]string | HTTP response headers |
| Body | io.ReadCloser | Data flow of the object |
| DeleteMarker | bool | Whether the deleted object is a delete marker |
| StorageClass | Storage class of the object | |
| AllowOrigin | string | If Origin in the request meets the CORS rules of the bucket, AllowedOrigin in the CORS rules is returned. |
| AllowHeader | string | If RequestHeader in the request meets the CORS rules of the bucket, AllowedHeader in the CORS rules is returned. |
| AllowMethod | string | AllowedMethod in the CORS rules of the bucket |
| ExposeHeader | string | ExposeHeader in the CORS rules of the bucket |
| MaxAgeSeconds | int | MaxAgeSeconds in the CORS rules of the bucket |
| ContentLength | int64 | Object size in bytes |
| CacheControl | string | Cache-Control header in the response |
| ContentDisposition | string | Content-Disposition header in the response |
| ContentEncoding | string | Content-Encoding header in the response |
| ContentLanguage | string | Content-Language header in the response |
| ContentType | string | MIME type of the object |
| Expires | string | Expires header in the response |
| LastModified | time.Time | Time when the last modification was made to the object |
| ETag | string | Object ETag |
| VersionId | string | Object version ID |
| Restore | string | Restore status of the Archive object. If the object is not in the OBS Archive storage class, the value is nil. |
| Expiration | string | Expiration details |
| SseHeader | or | Header for server-side encryption |
| WebsiteRedirectLocation | string | Location where the object is redirected to, when the bucket is configured with website hosting. |
| Metadata | map[string]string | Customized metadata of the object |
After reading data from the Body field, you must call its Close method to close the connection.
Last Article: Request Parameter of GET Object
Next Article: Request Parameter of PUT Object - Copy
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.