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.
26 lines
544 B
26 lines
544 B
package client
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func newHttpClient(config Config) *http.Client {
|
|
|
|
transCfg := &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: config.SSLSkipVerify}}
|
|
|
|
return &http.Client{
|
|
Transport: &transport{
|
|
base: transCfg,
|
|
retries: config.Retries,
|
|
clientId: config.AppId,
|
|
clientSecret: config.AppSecret,
|
|
ssoUrl: config.SSOUrl,
|
|
//TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
},
|
|
|
|
Timeout: 5 * time.Minute,
|
|
}
|
|
}
|