summaryrefslogtreecommitdiffstats
path: root/modules/private/internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/internal.go')
-rw-r--r--modules/private/internal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/private/internal.go b/modules/private/internal.go
index b4fee2680f..360fae47b6 100644
--- a/modules/private/internal.go
+++ b/modules/private/internal.go
@@ -6,13 +6,13 @@ package private
import (
"crypto/tls"
- "encoding/json"
"fmt"
"net"
"net/http"
"code.gitea.io/gitea/modules/httplib"
"code.gitea.io/gitea/modules/setting"
+ jsoniter "github.com/json-iterator/go"
)
func newRequest(url, method string) *httplib.Request {
@@ -27,6 +27,7 @@ type Response struct {
func decodeJSONError(resp *http.Response) *Response {
var res Response
+ json := jsoniter.ConfigCompatibleWithStandardLibrary
err := json.NewDecoder(resp.Body).Decode(&res)
if err != nil {
res.Err = err.Error()