Answers for "golang https stop ssl verification"

0

golang https stop ssl verification

package main

import (
    "fmt"
    "net/http"
    "crypto/tls"
)

func main() {
    tr := &http.Transport{
        TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
    }
    client := &http.Client{Transport: tr}
    _, err := client.Get("https://golang.org/")
    if err != nil {
        fmt.Println(err)
    }
}
Posted by: Guest on January-25-2021

Code answers related to "golang https stop ssl verification"

Browse Popular Code Answers by Language