You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
decort-golang-sdk/internal/client/http-client.go

28 lines
575 B

package client
import (
"crypto/tls"
"net/http"
"time"
"github.com/rudecs/decort-sdk/config"
)
func NewHttpClient(cfg config.Config) *http.Client {
transCfg := &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: cfg.SSLSkipVerify}}
return &http.Client{
Transport: &transport{
base: transCfg,
retries: cfg.Retries,
clientId: cfg.AppID,
clientSecret: cfg.AppSecret,
ssoUrl: cfg.SSOURL,
//TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
Timeout: 5 * time.Minute,
}
}