fix: use HTTP client from config. (#1112)

This commit is contained in:
Ludovic Fernandez 2020-04-17 09:46:42 +02:00 committed by GitHub
parent 31baa53761
commit ae818a411c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -79,6 +79,10 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
client := rimuhosting.NewClient(config.APIKey) client := rimuhosting.NewClient(config.APIKey)
client.BaseURL = rimuhosting.DefaultRimuHostingBaseURL client.BaseURL = rimuhosting.DefaultRimuHostingBaseURL
if config.HTTPClient != nil {
client.HTTPClient = config.HTTPClient
}
return &DNSProvider{config: config, client: client}, nil return &DNSProvider{config: config, client: client}, nil
} }

View file

@ -79,6 +79,10 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
client := rimuhosting.NewClient(config.APIKey) client := rimuhosting.NewClient(config.APIKey)
client.BaseURL = rimuhosting.DefaultZonomiBaseURL client.BaseURL = rimuhosting.DefaultZonomiBaseURL
if config.HTTPClient != nil {
client.HTTPClient = config.HTTPClient
}
return &DNSProvider{config: config, client: client}, nil return &DNSProvider{config: config, client: client}, nil
} }