func newService(config *Config) *service {
	if config == nil {
		c := defaultConfig
		config = &c
	}
	if config.HTTPClient == nil {
		config.HTTPClient = http.DefaultClient
	}
	return &service{
		config: config,
	}
}
newService returns a new service. If a nil Config is
provided, DefaultConfig will be used.
package gate
import (
	"net/http"
	"net/url"
)
const Version = "v1.2.1"
const (
	bodyTypeURLEncoded = "application/x-www-form-urlencoded"
	bodyTypeJSON       = "application/json; charset=utf-8"
)
type (
	service struct {
		config  *Config
		baseURL *url.URL
	}
)