百度智能云

All Product Document

          CDN

          Query HttpHeader

          Interface

          This interface is used to query the Http Header of the specified accelerated domain name. The domain name shall belong to the user, otherwise it returns 403 failure.

          Method Path Description
          GET /v2/domain/{domain}/config?httpHeader Query the Header of the domain name

          domain: Need to query the accelerated domain name of CDN.

          Response body

          Parameter Type Description
          httpHeader HttpHeader The set forward-to-origin or responded Header

          Response code (Http Status Code)

          HTTP Status Code Description
          200 Success
          403 Failed

          Request example

          GET /v2/domain/myself.baidu.com/config?httpHeader HTTP/1.1 
          Host: cdn.baidubce.com 

          Response example

          HTTP/1.1 200 OK 
          Content-Type: application/json; charset=utf-8 
          Transfer-Encoding: chunked 
          
          { 
          	 "httpHeader": [{ 
          	 	 "type": "origin", 
          	 	 "action": "add", 
          	 	 "header": "x-auth-cn", 
          	 	 "value": "xxx", 
          	 	 "describe": "" 
          	 }, { 
          	 	 "type": "response", 
          	 	 "action": "add", 
          	 	 "header": "content-type", 
          	 	 "value": "application\/octest-stream", 
          	 	 "describe": "" 
          	 }] 
          } 
          Previous
          Set HttpHeader
          Next
          Set the SEO Switch Attribute