func SendReq(req *http.Request,result interface{}) error {
	tr := &http.Transport{
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}
	client := &http.Client{Transport:tr}
	resp,err := client.Do(req)
	if err != nil{
		fmt.Printf("Fail exec http client Do,err:%s\n",err.Error())
		return err
	}
    ...
}

关键是在上面代码中 tr 变量中将 tls.Config 给跳过

相关文章:

  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-10-29
  • 2021-05-27
  • 2021-05-06
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案