added skip vetify of server cert
This commit is contained in:
@@ -41,7 +41,7 @@ func setApiPath(base, apipath string) (string, error) {
|
||||
|
||||
}
|
||||
|
||||
func doHTTPCall(ctx context.Context, apiuri string, reqBytes []byte) ([]byte, error) {
|
||||
func doHTTPCall(ctx context.Context, skipTLSVerify bool, apiuri string, reqBytes []byte) ([]byte, error) {
|
||||
var err error
|
||||
respBytes := make([]byte, 0)
|
||||
|
||||
@@ -60,7 +60,7 @@ func doHTTPCall(ctx context.Context, apiuri string, reqBytes []byte) ([]byte, er
|
||||
httpReq.Header.Add("Authorization", basicHeader)
|
||||
}
|
||||
transport := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTLSVerify},
|
||||
}
|
||||
httpClient := &http.Client{
|
||||
Transport: transport,
|
||||
|
||||
Reference in New Issue
Block a user