v1.0.5
This commit is contained in:
1 parent
d340d1b2ad
commit
7ccd84cd96
101 files changed
+2070
-344
No files matched your search
@@ -191,6 +191,7 @@ func NewClient(serverURL string, skipCertificateChecks bool) (*Client, error) {
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("clone http.DefaultTransport: got %T, want *http.Transport", http.DefaultTransport)
|
||||
}
|
||||
|
||||
transport := defaultTransport.Clone()
|
||||
tlsConfig := &tls.Config{}
|
||||
if transport.TLSClientConfig != nil {
|
||||
@@ -208,6 +209,7 @@ func NewClientWithConfig(cfg *core.Configuration) *Client {
|
||||
if cfg == nil {
|
||||
cfg = NewConfiguration()
|
||||
}
|
||||
|
||||
cfg.ServerURL = strings.TrimSuffix(cfg.ServerURL, "/")
|
||||
if !strings.HasSuffix(cfg.ServerURL, "/api/v1") {
|
||||
cfg.ServerURL += "/api/v1"
|
||||
@@ -215,6 +217,7 @@ func NewClientWithConfig(cfg *core.Configuration) *Client {
|
||||
if cfg.HTTPClient == nil {
|
||||
cfg.HTTPClient = http.DefaultClient
|
||||
}
|
||||
|
||||
client := &Client{cfg: cfg}
|
||||
client.DeAPISIX = de_apisix.NewAPIClient(cfg).DeAPISIX
|
||||
client.DeAudits = de_audits.NewAPIClient(cfg).DeAudits
|
||||
|
||||
Reference in new issue
Block a user