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 }