All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

SetHttp2OptionConfig

Last updated:2021-03-17 11:08:04

SetHttp2OptionConfig

Description

You can call this operation to configure HTTP 2.0 for a domain name.

Note:

HTTP 2.0 is disabled by default after a domain name is added.

Request syntax

The API request contains the specified directory /2016-09-01/domain/SetHttp2OptionConfig, common request headers, and operation-specific request parameters. For more information, see the sample request.

Request headers

Header Required Type Description
X-Version Yes String The version number. Set the value to 2016-09-01.
X-Action Yes String The operation that you want to perform. Set the value to SetHttp2OptionConfig.

Request parameters

Parameter Required Type Description
DomainId Yes String The ID of the domain name.
Enable Yes String Specifies whether to enable HTTP 2.0. Valid values: on and off. Default value: off. A certificate must be configured for the domain name before you enable HTTP 2.0.

Examples

Sample request

GET method:

GET /2016-09-01/domain/SetHttp2OptionConfig?DomainId=2D08M8V&Enable=off
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action:SetHttp2OptionConfig
x-version:2016-09-01

POST method:

POST /2016-09-01/domain/SetHttp2OptionConfig
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: SetHttp2OptionConfig
x-version: 2016-09-01
Content-Type: application/json

{
    "DomainId": "2D08M8V",
    "Enable": "off"
}

Sample response

  • Note: If this operation is successfully called, the HTTP status code 200 is returned, without a return value. If this operation fails to be called, the HTTP status code 403 or 400 is returned. For more information about the error codes for the HTTP status code 400, see Usage notes.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback