Skip to content

Commit

Permalink
fix contentType in doRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
yndu13 authored and peze committed Sep 17, 2021
1 parent 9b02674 commit b44ddae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ func (client *Client) DoRequest(params *Params, request *OpenApiRequest, runtime
jsonObj := util.ToJSONString(request.Body)
hashedRequestPayload = openapiutil.HexEncode(openapiutil.Hash(util.ToBytes(jsonObj), signatureAlgorithm))
request_.Body = tea.ToReader(jsonObj)
request_.Headers["content-type"] = tea.String("application/json; charset=utf-8")
} else {
m := util.AssertAsMap(request.Body)
formObj := openapiutil.ToForm(m)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.14

require (
github.com/alibabacloud-go/darabonba-string v1.0.0
github.com/alibabacloud-go/openapi-util v0.0.7
github.com/alibabacloud-go/openapi-util v0.0.8
github.com/alibabacloud-go/tea v1.1.15
github.com/alibabacloud-go/tea-utils v1.3.9
github.com/aliyun/credentials-go v1.1.2
Expand Down

0 comments on commit b44ddae

Please sign in to comment.