feat: add move from dynectsoap to dynsoap

This commit is contained in:
pg2000 2021-04-18 09:36:54 +02:00
parent ca3d3f81e2
commit 73c6fc9daf
No known key found for this signature in database
GPG Key ID: 52DB87546559AD42

View File

@ -23,7 +23,7 @@ import (
"github.com/hooklift/gowsdl/soap" "github.com/hooklift/gowsdl/soap"
) )
// Returns a Dynect Client with a configured http.Client // NewDynectClient returns a client with a configured http.Client
// The default settings for the http.client are a timeout of // The default settings for the http.client are a timeout of
// 10 seconds and reading proxy variables from http.ProxyFromEnvironment // 10 seconds and reading proxy variables from http.ProxyFromEnvironment
func NewDynectClient(url string) Dynect { func NewDynectClient(url string) Dynect {
@ -37,7 +37,7 @@ func NewDynectClient(url string) Dynect {
return NewDynect(soapClient) return NewDynect(soapClient)
} }
// Returns a Dynect Client without a configured http.Client // NewCustomDynectClient returns a client without a configured http.Client
func NewCustomDynectClient(url string, client http.Client) Dynect { func NewCustomDynectClient(url string, client http.Client) Dynect {
soapClient := soap.NewClient(url, soap.WithHTTPClient(&client)) soapClient := soap.NewClient(url, soap.WithHTTPClient(&client))
return NewDynect(soapClient) return NewDynect(soapClient)