How to send a https request with a certificate golang
You need to add CA of your certificate to your transport like: package main import ( “crypto/tls” “io/ioutil” “log” “net/http” “crypto/x509” ) func main() { caCert, err := ioutil.ReadFile(“rootCA.crt”) if err != nil { log.Fatal(err) } caCertPool := x509.NewCertPool() caCertPool.AppendCertsFromPEM(caCert) client := &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{ RootCAs: caCertPool, }, }, } _, err := … Read more