master v1.0.37
李光春 1 year ago
parent 3270d719a4
commit ad0965336d

@ -11,4 +11,4 @@ var (
httpParamsModeForm = "FORM"
)
const Version = "1.0.36"
const Version = "1.0.37"

@ -22,6 +22,7 @@ import (
// Response 返回内容
type Response struct {
RequestId string //【请求】编号
RequestUri string //【请求】链接
RequestParams Params //【请求】参数
RequestMethod string //【请求】方式
@ -218,11 +219,11 @@ func request(app *App, ctx context.Context) (httpResponse Response, err error) {
}
// 跟踪编号
traceId := gotrace_id.GetTraceIdContext(ctx)
if traceId == "" {
traceId = gostring.GetUuId()
httpResponse.RequestId = gotrace_id.GetTraceIdContext(ctx)
if httpResponse.RequestId == "" {
httpResponse.RequestId = gostring.GetUuId()
}
httpResponse.RequestHeader.Set("X-Request-Id", traceId)
httpResponse.RequestHeader.Set("X-Request-Id", httpResponse.RequestId)
// 请求内容
var reqBody io.Reader

Loading…
Cancel
Save