设置页面优化
更新时间:2019-07-23
本接口用于开启或关闭页面优化,页面优化指去除HTML页面冗余内容(如注释以及重复的空白符)。
Method | Path | 说明 |
---|---|---|
PUT | /v2/domain/{domain}/config?fileTrim | 开启或关闭页面优化 |
domain: CDN加速域名
请求体(Request Body)
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
fileTrim | 必选 | bool | true表示开启页面优化,false表示关闭 |
响应码 (Http Status Code)
HTTP Status Code | 说明 |
---|---|
200 | 成功 |
400 | 更新失败,参数错误等 |
请求示例
Plain Text
1PUT /v2/domain/myself.baidu.com/config?fileTrim HTTP/1.1
2Host: cdn.baidubce.com
3Content-Length: 17
4Content-Type: application/json
5
6{
7 "fileTrim":true
8}
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json; charset=utf-8
3Transfer-Encoding: chunked
4
5{
6 "status":"RUNNING"
7}