odtool / utils /utils.go
bot
εˆε§‹εŒ–
9f6f5a5
raw
history blame contribute delete
450 Bytes
package utils
import (
"crypto/tls"
"time"
"github.com/go-resty/resty/v2"
)
var (
RestyClient = newRestyClient()
)
func newRestyClient() *resty.Client {
client := resty.New()
client.SetDisableWarn(true)
client.SetTimeout(10 * time.Second)
client.SetRetryCount(3)
client.SetRetryWaitTime(2 * time.Second)
client.SetRetryMaxWaitTime(10 * time.Second)
client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
return client
}