Merge pull request #5667 from ioito/hotfix/qx-qcloud-sdk

fix: 修复更新qcloud sdk引出的不兼容问题
This commit is contained in:
yunion-ci-robot
2020-04-02 18:51:50 +08:00
committed by GitHub
+6 -2
View File
@@ -324,7 +324,9 @@ func _jsonRequest(client *common.Client, domain string, version string, apiName
if region, ok := params["Region"]; ok {
client = client.Init(region)
}
client.WithProfile(profile.NewClientProfile())
_profile := profile.NewClientProfile()
_profile.SignMethod = common.SHA256
client.WithProfile(_profile)
service := strings.Split(domain, ".")[0]
req.Init().WithApiInfo(service, version, apiName)
req.SetDomain(domain)
@@ -349,7 +351,9 @@ func _phpJsonRequest(client *common.Client, resp qcloudResponse, domain string,
if region, ok := params["Region"]; ok {
client = client.Init(region)
}
client.WithProfile(profile.NewClientProfile())
_profile := profile.NewClientProfile()
_profile.SignMethod = common.SHA256
client.WithProfile(_profile)
service := strings.Split(domain, ".")[0]
req.Init().WithApiInfo(service, version, apiName)
req.SetDomain(domain)