Merge pull request #2766 from ioito/hotfix/qx-utils-jsonrequest-fix

fix: 不能无限制追加 application/json
This commit is contained in:
yunion-ci-robot
2019-09-06 11:53:16 +08:00
committed by GitHub
+1 -1
View File
@@ -225,7 +225,7 @@ func JSONRequest(client *http.Client, ctx context.Context, method THttpMethod, u
if header == nil {
header = http.Header{}
}
header.Add("Content-Type", "application/json")
header.Set("Content-Type", "application/json")
resp, err := Request(client, ctx, method, urlStr, header, jbody, debug)
return ParseJSONResponse(resp, err, debug)
}