Help Center > Object Storage Service > API Reference > Common Message Headers

Common Message Headers

This chapter describes the common request and response REST message headers for OBS.

Common Request Headers

Table 1 describes headers common to OBS REST requests.

Table 1 Common request headers

Header

Description

Required

Authorization

Indicates the authentication information carried in the request.

Type: string

Default: none

Conditional: optional for anonymous requests and required for other requests

Conditionally required

Content-Length

Indicates the length of request content (excluding headers) defined by RFC 2616.

Type: string

Default: none

Conditional: required for PUT requests and those requests that load XML content

Conditionally required

Content-Type

Indicates the content type of the requested resource, for example, text/plain.

Type: string

Default: none

No

Date

Indicates the date and time at which the request is initiated.

Type: string

Default: none

Conditional: optional for anonymous requests or those requests containing header x-amz-date, required for other requests

Conditionally required

Host

Indicates the host address. For path-style requests, the value is a domain name such as obs.cn-north-1.myhwclouds.com or an IP address of the server. For virtual-host-style requests, the value is bucket name + domain name, for example, bucketname.obs.cn-north-1.myhwclouds.com.

Type: string

Default: none

Yes

Common Response Headers

Table 2 describes headers common to OBS REST responses.

Table 2 Common response headers

Header

Description

Content-Length

Indicates the length (in bytes) of the response body.

Type: string

Default: none

Connection

Indicates whether the connection to the server is open or closed.

Type: string.

Valid values: keep-alive | close

Default: none

Date

Indicates the date and time at which OBS responds to the request.

Type: string

Default: none

ETag

Indicates the hash value of the object. The entity tag (ETag) only reflects changes to the contents of the object, not its metadata.

Type: string

x-amz-id-2

Indicates a special token that helps OBS troubleshoot faults.

Type: string

Default: none

x-amz-request-id

Indicates the value created by OBS to uniquely identify the request. OBS uses this value to troubleshoot faults.

Type: string

Default: none

x-reserved

Indicates the copyright.

Type: string

Default: none

Registration