1 2 //Add header parameters, for example, X-Domain-Id for invoking a global service and X-Project-Id for invoking a project-level service. r.headers
1 2 3 4 //Add header parameters, for example, X-Domain-Id for invoking a global service and X-Project-Id for invoking a project-level service
HUAWEICLOUD_SDK_AK")); request.setSecret(System.getenv("HUAWEICLOUD_SDK_SK")); request.setMethod("GET"); request.setUrl("https://service.region.example.com3
比如访问的URL比API详情中的URL少一个“/”也会导致无法匹配上此API,例如https://vpc.region.cloud.com/test/和https://vpc.region.cloud.com/test会匹配上不同的API。 域名解析不正确。
本手册所有关于请求URL的举例,其中Endpoint以service.region.example.com为例。 父主题: AK/SK签名认证操作指导
以虚拟私有云服务的查询VPC列表接口为例,HTTP方法为GET,域名(Endpoint)为service.region.example.com,请求URI:/v1/77b6a44cba5143ab91d13ab9a8ff44fd/vpcs?
假设原始请求: GET https://service.region.example.com/v1/77b6a44cba5143ab91d13ab9a8ff44fd/vpcs?
and X-Project-Id for invoking a project-level service.
limit=2&; marker=13551d6b-755d-4757-b956-536f674975c0 HTTP/1.1 Host: service.region.example.com Content-Type: application/json x-sdk-date: 20191115T033655Z
1 2 //Add header parameters, for example, X-Domain-Id for invoking a global service and X-Project-Id for invoking a project-level service. request
您即将访问非华为云网站,请注意账号财产安全