From b040bb93bf0a5fb0b2d3a34dd31bfa9ceefd4d3d Mon Sep 17 00:00:00 2001 From: ioito Date: Fri, 6 Sep 2019 11:45:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8D=E8=83=BD=E6=97=A0=E9=99=90?= =?UTF-8?q?=E5=88=B6=E8=BF=BD=E5=8A=A0=20application/json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/util/httputils/httputils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/httputils/httputils.go b/pkg/util/httputils/httputils.go index b973338f77..7bd318bc9f 100644 --- a/pkg/util/httputils/httputils.go +++ b/pkg/util/httputils/httputils.go @@ -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) }