This topic describes common HTTP request and response headers.

Common request headers

In Object Storage Service (OSS), common HTTP request headers are used for RESTful APIs. These request headers can be used in all OSS requests. The following table describes the request headers.

Header Type Description
Authorization String The verification information used to verify the validity of a request.

Default value: null

Scenario: non-anonymous requests

Content-Length String The content length of an HTTP request that is defined in RFC 2616. For more information, visit RFC 2616.

Default value: null

Scenario: requests that need to submit data to OSS

Content-Type String The content type of an HTTP request that is defined in RFC 2616. For more information, visit RFC 2616.

Default value: null

Scenario: requests that need to submit data to OSS

Date String The GMT time specified in the HTTP/1.1 protocol. Example: Sun, 05 Sep 2021 23:00:00 GMT.

Default value: null

Host String The value of the host to access. Format: <bucketname>.oss-cn-hangzhou.aliyuncs.com.

Default value: null

Common response headers

In OSS, common HTTP response headers are used for RESTful APIs. These response headers can be used in all the OSS requests. The following table describes the response headers.

Header Type Description
Content-Length String The content length of an HTTP request that is defined in RFC 2616. For more information, visit RFC 2616.

Default value: null

Scenario: requests that need to submit data to OSS

Connection Enumeration The connection status between the client and the OSS server.

Valid values: keep-alive and close.

Default value: null

Date String The GMT time specified in the HTTP/1.1 protocol. Example: Sun, 05 Sep 2021 23:00:00 GMT.

Default value: null

ETag String The ETag that is created to identify the content of the object when the object is created. If an object is created by using a PutObject request, the ETag of the object is the MD5 hash of the object content. If an object is created by using other methods, the ETag of the object is not the MD5 hash of the object content but a unique value calculated based on the object. The ETag value of an object can be used to check whether the object content is modified.

Default value: null

Server String The server that generates a response.

Default value: AliyunOSS

x-oss-request-id String The universally unique identifier (UUID) that is created by the OSS server to identify the response. If you encounter an issue when you use OSS, you can contact OSS support personnel and provide them this field to locate the issue.

Default value: null