Help Center> Object Storage Service> SDK Reference> Python> Data Types> Additional Header of the Request for Downloading an Object

Additional Header of the Request for Downloading an Object

Namespace

obs.GetObjectHeader

Parameter Description

Field

Type

Optional or Mandatory

Description

range

str

Optional

Download range. The value range is [0, object length-1] and is in the format of x-y. The maximum length of range is the length of the object minus 1. If it exceeds this value, the length of the object minus 1 is used.

if_match

str

Optional

Returns the source object if its ETag is the same as the one specified by this parameter; otherwise, an error code is returned.

if_none_match

str

Optional

Returns the source object if its ETag is different from the one specified by this parameter; otherwise, an error code is returned.

if_modified_since

str

or

DateTime

Optional

Returns the object if it is modified after the time specified by this parameter; otherwise, an error code is returned. If this parameter value is a character string, it must conform to the HTTP time format specified in http://www.ietf.org/rfc/rfc2616.txt.

if_unmodified_since

str

or

DateTime

Optional

Returns the object if it remains unchanged since the time specified by this parameter; otherwise, an error code is returned. If this parameter value is a character string, it must conform to the HTTP time format specified in http://www.ietf.org/rfc/rfc2616.txt.

origin

str

Optional

Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

requestHeaders

str

Optional

HTTP headers in a cross-domain request

sseHeader

SseCHeader

Optional

Header for server-side decryption

  • If a request includes if_unmodified_since or if_match and the specified condition is not met, the object download will fail with error code 412 Precondition Failed.
  • If a request includes if_modified_since or if_none_match and the specified condition is not met, the object download will fail with error code 304 Not Modified returned.
  • The maximum length of range is the length of the source object minus 1. If it exceeds this value, the length of the source object minus 1 is used.