From 739a50167e6426befee87831a8b8178a06defed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 4 Oct 2022 03:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E7=BB=93=E6=9E=9C=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=88=87=E6=8D=A2=E6=96=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc.go b/rpc.go index 2dcce9c..8d00edd 100644 --- a/rpc.go +++ b/rpc.go @@ -323,7 +323,7 @@ func (r *request) Send(ctx *gin.Context, serviceFlag string, apiFlag string, par logDataList = append(logDataList, zap.Any("response_header", response.Header)) logDataList = append(logDataList, zap.Any("response_http_code", response.StatusCode)) - if responseBody, err = io.ReadAll(response.Body); nil != err { + if responseBody, err = r.getResponseBody(response); nil != err { logDataList = append(logDataList, zap.String("read_body_fail_reason", err.Error())) return err }