Package HTTPCli:

- add interface for http client implement the function Do
This commit is contained in:
Nicolas JUHEL
2023-12-14 13:44:49 +01:00
parent 1d4bc986d7
commit eb9f94e916

View File

@@ -51,6 +51,10 @@ const (
type FctHttpClient func() *http.Client
type HttpClient interface {
Do(req *http.Request) (*http.Response, error)
}
func GetTransport(DisableKeepAlive, DisableCompression, ForceHTTP2 bool) *http.Transport {
return &http.Transport{
Proxy: http.ProxyFromEnvironment,