提交 aad67f9c authored 作者: mooncake9527's avatar mooncake9527

update

上级 2fd68744
......@@ -342,7 +342,7 @@ func (req *Request) send(ctx context.Context, body io.Reader, buf *bytes.Buffer)
return xerror.New(err.Error())
}
bodyBuf := bytes.NewBuffer(body)
xctx.SetVal(ctx, fmt.Sprintf("oApiRsp-%s", xctx.CtxRequestID(ctx)), buf.String())
xctx.SetVal(ctx, fmt.Sprintf("oApiRsp-%s", xctx.CtxRequestID(ctx)), bodyBuf.String())
logger.Info("httpcli rsp", logger.Any("body", bodyBuf.String()), xctx.CtxTraceIDField(ctx))
if body != nil {
resp.Body = io.NopCloser(bodyBuf)
......@@ -371,7 +371,7 @@ func (req *Request) send(ctx context.Context, body io.Reader, buf *bytes.Buffer)
err = xerror.New(e.Error())
}
bodyBuf := bytes.NewBuffer(body)
xctx.SetVal(ctx, fmt.Sprintf("oApiRsp-%s", xctx.CtxRequestID(ctx)), buf.String())
xctx.SetVal(ctx, fmt.Sprintf("oApiRsp-%s", xctx.CtxRequestID(ctx)), bodyBuf.String())
logger.Info("httpcli rsp", logger.Any("body", bodyBuf.String()), xctx.CtxTraceIDField(ctx))
if body != nil {
resp.Body = io.NopCloser(bodyBuf)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论