请求结果解析切换新方法

This commit is contained in:
白茶清欢 2022-10-04 03:18:36 +08:00
parent 024caeea25
commit 739a50167e

2
rpc.go
View File

@ -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
}