@@ -723,7 +723,8 @@ func (client *Client) DoRPCRequest(action *string, version *string, protocol *st
723
723
"x-acs-action" : action ,
724
724
"user-agent" : client .GetUserAgent (),
725
725
}, globalHeaders ,
726
- extendsHeaders )
726
+ extendsHeaders ,
727
+ request .Headers )
727
728
} else {
728
729
request_ .Headers = tea .Merge (map [string ]* string {
729
730
"host" : client .Endpoint ,
@@ -732,6 +733,7 @@ func (client *Client) DoRPCRequest(action *string, version *string, protocol *st
732
733
"user-agent" : client .GetUserAgent (),
733
734
}, globalHeaders ,
734
735
extendsHeaders ,
736
+ request .Headers ,
735
737
headers )
736
738
}
737
739
@@ -2029,33 +2031,44 @@ func (client *Client) CallApi(params *Params, request *OpenApiRequest, runtime *
2029
2031
return _result , _err
2030
2032
}
2031
2033
2032
- if tea .BoolValue (util .IsUnset (client .SignatureAlgorithm )) || ! tea .BoolValue (util .EqualString (client .SignatureAlgorithm , tea .String ("v2" ))) {
2033
- _result = make (map [string ]interface {})
2034
- _body , _err := client .DoRequest (params , request , runtime )
2035
- if _err != nil {
2034
+ if tea .BoolValue (util .IsUnset (client .SignatureVersion )) || ! tea .BoolValue (util .EqualString (client .SignatureVersion , tea .String ("v4" ))) {
2035
+ if tea .BoolValue (util .IsUnset (client .SignatureAlgorithm )) || ! tea .BoolValue (util .EqualString (client .SignatureAlgorithm , tea .String ("v2" ))) {
2036
+ _result = make (map [string ]interface {})
2037
+ _body , _err := client .DoRequest (params , request , runtime )
2038
+ if _err != nil {
2039
+ return _result , _err
2040
+ }
2041
+ _result = _body
2036
2042
return _result , _err
2037
- }
2038
- _result = _body
2039
- return _result , _err
2040
- } else if tea . BoolValue ( util . EqualString ( params . Style , tea . String ( "ROA" ))) && tea . BoolValue ( util . EqualString ( params . ReqBodyType , tea . String ( "json" ))) {
2041
- _result = make ( map [ string ] interface {})
2042
- _body , _err := client . DoROARequest ( params . Action , params . Version , params . Protocol , params . Method , params . AuthType , params . Pathname , params . BodyType , request , runtime )
2043
- if _err != nil {
2043
+ } else if tea . BoolValue ( util . EqualString ( params . Style , tea . String ( "ROA" ))) && tea . BoolValue ( util . EqualString ( params . ReqBodyType , tea . String ( "json" ))) {
2044
+ _result = make ( map [ string ] interface {})
2045
+ _body , _err := client . DoROARequest ( params . Action , params . Version , params . Protocol , params . Method , params . AuthType , params . Pathname , params . BodyType , request , runtime )
2046
+ if _err != nil {
2047
+ return _result , _err
2048
+ }
2049
+ _result = _body
2044
2050
return _result , _err
2045
- }
2046
- _result = _body
2047
- return _result , _err
2048
- } else if tea .BoolValue (util .EqualString (params .Style , tea .String ("ROA" ))) {
2049
- _result = make (map [string ]interface {})
2050
- _body , _err := client .DoROARequestWithForm (params .Action , params .Version , params .Protocol , params .Method , params .AuthType , params .Pathname , params .BodyType , request , runtime )
2051
- if _err != nil {
2051
+ } else if tea .BoolValue (util .EqualString (params .Style , tea .String ("ROA" ))) {
2052
+ _result = make (map [string ]interface {})
2053
+ _body , _err := client .DoROARequestWithForm (params .Action , params .Version , params .Protocol , params .Method , params .AuthType , params .Pathname , params .BodyType , request , runtime )
2054
+ if _err != nil {
2055
+ return _result , _err
2056
+ }
2057
+ _result = _body
2058
+ return _result , _err
2059
+ } else {
2060
+ _result = make (map [string ]interface {})
2061
+ _body , _err := client .DoRPCRequest (params .Action , params .Version , params .Protocol , params .Method , params .AuthType , params .BodyType , request , runtime )
2062
+ if _err != nil {
2063
+ return _result , _err
2064
+ }
2065
+ _result = _body
2052
2066
return _result , _err
2053
2067
}
2054
- _result = _body
2055
- return _result , _err
2068
+
2056
2069
} else {
2057
2070
_result = make (map [string ]interface {})
2058
- _body , _err := client .DoRPCRequest (params . Action , params . Version , params . Protocol , params . Method , params . AuthType , params . BodyType , request , runtime )
2071
+ _body , _err := client .Execute (params , request , runtime )
2059
2072
if _err != nil {
2060
2073
return _result , _err
2061
2074
}
0 commit comments