resty.Client请求报EOF错误

160 阅读1分钟
func init() {
   client = resty.New().SetTimeout(3 * time.Second).SetTLSClientConfig(&tls.Config{
      InsecureSkipVerify: true,
   })
}

修改后

func init() {
   client = resty.New().SetRetryCount(1).SetTimeout(3 * time.Second).SetTLSClientConfig(&tls.Config{
      InsecureSkipVerify: true,
   })
}

或超时时间(未尝试)