Common HTTP headers

Updated at:
Copy as MD

OSS RESTful APIs use a set of common request headers and response headers.

Common request headers

The following table describes the common request headers used in OSS RESTful API requests.

Name

Type

Example value

Description

Authorization

String

OSS4-HMAC-SHA256 Credential=****

Authenticates non-anonymous requests. To calculate this header, see Signature Version 4 (Recommended).

Default value: none

Content-Length

String

556

The length of the HTTP request content as defined in RFC 2616.

Default value: none

Content-Type

String

application/xml

The content type of the HTTP request as defined in RFC 2616.

Default value: none

Date

String

Sun, 05 Sep 2021 23:00:00 GMT

The GMT time specified in HTTP 1.1.

Default value: none

Host

String

oss-example.oss-cn-hangzhou.aliyuncs.com

The endpoint is in the BucketName.Endpoint format. For example, oss-example.oss-cn-hangzhou.aliyuncs.com.

Default value: none

x-oss-security-token

String

CAISowJ1q6Ft5B2yfSjIr5feHsPhtYh3+pONd2uCglI3dvxVt7DB1Tz2IHxMdHJsCeAcs/Q0lGFR5/sflqJIRoReREvCUcZr8sy2SqEGos2T1fau5Jko1be0ewHKeQKZsebWZ+LmNpy/Ht6md1HDkAJq3LL+bk/Mdle5MJqP+/kFC9MMRVuAcCZhDtVbLRcYgq18D3bKMuu3ORPHm3fZCFES2jBxkmRi86+ysIP+phPVlw/90fRH5dazcJW0Zsx0OJo6Wcq+3+FqM6DQlTNM6hwNtoUO1fYUommb54nDXwQIvUjfbtC5qIM/cFVLAYEhALNBofTGkvl1h/fejYyfyWwWYbkFCHiPFNr9kJCUSbr4a4sjF6zyPnPWycyCLYXleLzhxPWd/2kagAF6qLNY5paXF18NyRP0PISqxlWBuSQldMS3avlblTFB7apY8CUiAQcSY3uDYUhuxU+KFBxpGaq8c1SU5ARo+1JBA5nXhFlY2nbDnWONxa0mvNvE3XJ0FZJnDS7WBHyOMjC8nmw2GfaQ4bxQ0D2+20yrDNevWSSqnwh0qXMI3zY5****

Required only when you access OSS with temporary credentials from Security Token Service (STS). AssumeRole - Obtain temporary identity credentials for a role.

Common response headers

The following table describes the common response headers returned by OSS RESTful APIs.

Name

Type

Example value

Description

Content-Length

String

556

The HTTP response content length as defined in RFC 2616.

Default value: none

Connection

Enumeration

keep-alive

The connection status between the client and OSS.

Valid values: keep-alive and close

Default value: none

Date

String

Sun, 05 Sep 2021 23:00:00 GMT

The GMT time specified in HTTP 1.1.

Default value: none

ETag

String

5B3C1A2E053D763E1B002CC607C5A0FE1****

An entity tag that identifies object content. For objects created by PutObject, the ETag is the MD5 hash of the content. For objects created by other methods, the ETag is a unique value based on a specific rule, not the MD5 hash. Use ETags to detect content changes.

Default value: none

Server

String

AliyunOSS

The server that generated the response.

Default value: AliyunOSS

x-oss-request-id

String

534B371674E88A4D8906****

A UUID that uniquely identifies the request. Provide this ID to technical support for troubleshooting. Obtain a Request ID.

Default value: none