作者 yangfu

1.https证书忽略

package svr
import (
"crypto/tls"
"encoding/json"
"fmt"
"github.com/astaxie/beego/httplib"
... ... @@ -36,6 +37,9 @@ func (serviceGateway *httplibBaseServiceGateway) createRequest(url string, metho
default:
request = httplib.Get(url)
}
if strings.Contains(serviceGateway.baseURL, "https") {
request.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
}
return request.SetTimeout(serviceGateway.connectTimeout, serviceGateway.readWriteTimeout)
}
... ...