Enables or disables the HTTP/2 protocol for an accelerated domain name.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetHttpsOptionConfig

The operation that you want to perform. Set the value to SetHttpsOptionConfig.

DomainName String Yes xxx

The accelerated domain names. You can specify multiple domain names and separate them with commas (,).

Http2 String Yes on

Specifies whether to enable HTTP/2.

  • on: enable
  • off: disable

Response parameters

Parameter Type Example Description
RequestId String 6649A92B-F105-48A0-BC94-E5BB38570652

The ID of the request.

Examples

Sample requests

http://cdn.aliyuncs.com?Action=SetHttpsOptionConfig
&DomainName=xxx
&Http2=on
&<Common request parameters>

Sample success responses

XML format

<SetHttpsOptionConfigResponse>
      <RequestId>AED00EC1-32A8-4D48-BEB9-BD782AF3C6BD</RequestId>
</SetHttpsOptionConfigResponse>

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

HttpCode Error code Error message Description
400 MissingParameter The specified value of parameter DomainName can not be empty. The error message returned because the DomainName parameter is not set.
400 HttpsNotEnabled Please open https first. The error message returned because the HTTPS secure acceleration feature is not enabled for the accelerated domain name.

For a list of error codes, visit the API Error Center.