Updated on 2024-05-16 GMT+08:00

Querying Response Headers

Function

This API is used to query response headers.

URI

GET /v1.0/cdn/domains/{domain_id}/response-header

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Specifies the acceleration domain name ID. For details, see Querying Details About a Domain Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API.

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of **X-Subject-Token** in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

headers

HeaderMap object

Specifies the HTTP header value.

Table 5 HeaderMap

Parameter

Type

Description

Content-Disposition

String

Specifies the format in which the response content is displayed.

Content-Language

String

Specifies the languages that the visitor wants to use.

Access-Control-Allow-Origin

String

Specifies whether cross-origin resource sharing (CORS) is enabled for the response content.

Access-Control-Allow-Methods

String

Specifies the methods that can be used by the content to be accessed by the client.

Access-Control-Max-Age

String

Specifies how long the information provided by the Access-Control-Allow-Methods and Access-Control-Allow-Headers can be cached.

Access-Control-Expose-Headers

String

Specifies the headers that can be exposed as a part of responses to requests from other clients.

Example Requests

GET https://cdn.myhuaweicloud.com/v1.0/cdn/domains/ff808***********************307d/response-header?enterprise_project_id=0

Example Responses

Status code: 200

OK

{
  "headers" : {
    "Content-Disposition" : "test.xml",
    "Content-Language" : "en-US",
    "Access-Control-Max-Age" : "86400"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.