This commit is contained in:
白茶清欢 2024-06-05 21:55:27 +08:00
parent ee1dce2b5e
commit b1fec2cbb7

View File

@ -159,9 +159,6 @@ func (hc *HttpClient) Request() *define.Response {
for i := 0; i < hc.reqConfig.RetryRule.RetryCount+1; i++ { for i := 0; i < hc.reqConfig.RetryRule.RetryCount+1; i++ {
response.Seq++ response.Seq++
response.RequestCount++ response.RequestCount++
response.Header = map[string]string{}
response.Cookie = map[string]string{}
response.Body = map[string]any{}
if response.RestyResponse, err = hc.request.Send(); nil != err { if response.RestyResponse, err = hc.request.Send(); nil != err {
response.FailInfo = &define.ResponseFailInfo{ response.FailInfo = &define.ResponseFailInfo{
Type: define.RequestFailTypeSend, Type: define.RequestFailTypeSend,
@ -203,7 +200,7 @@ func (hc *HttpClient) newResponse() *define.Response {
return &define.Response{ return &define.Response{
Header: map[string]string{}, Header: map[string]string{},
Cookie: map[string]string{}, Cookie: map[string]string{},
Body: map[string]any{}, Body: "",
Code: "", Code: "",
Message: "", Message: "",
Data: "", Data: "",