应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案、点播分发、直播分发、移动加速、网页加速、下载分发、全站加速
查询Http2.0配置接口。接口url的*可为域名名称或域名id。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain | String | 是 | 需要查询配置的域名(domainName)或域名id(domainId) |
参数名称 | 类型 | 描述 |
---|---|---|
domainName | String | 需要查询配置的域名(domainName) |
domainId | String | 需要查询配置的域名id(domainId) |
http2Settings | Object | http2.0设置,用于设置http2.0的开启或关闭,父标签 |
enableHttp2 | Boolean | 开启http2.0,可选值为true和false,为空时默认为false。true表示开启http2.0;false表示关闭http2.0 |
backToOriginProtocol | String | 回源协议,可选值为 http1.1:使用HTTP1.1协议版本回源,不填时默认该协议 follow-request:跟随客户端请求协议 http2.0:使用HTTP2.0协议版本回源 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/config/http2/123344" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json"
HTTP/1.1 200 OK Date: Sun, 05 May 2019 09:08:53 GMT Content-Type: application/json;charset=utf-8 x-cnc-request-id: 83bbebc7-2c95-47d7 { "code":"0", "message":"success", "data":{ "domainName":"www.example.com", "domainId":"123344", "http2Settings":{ "enableHttp2":"true", "backToOriginProtocol":"http2.0" } } }