19 lines
321 B
Go
19 lines
321 B
Go
package client
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"net/http"
|
|
)
|
|
|
|
type roundTripper struct{}
|
|
|
|
func (t *roundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
|
|
tlsConfig := &tls.Config{
|
|
InsecureSkipVerify: true,
|
|
}
|
|
httpTransport := &http.Transport{
|
|
TLSClientConfig: tlsConfig,
|
|
}
|
|
return httpTransport.RoundTrip(r)
|
|
}
|