-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Information Provided
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Go - Library
-
Labels:None
THttpClientOptions (http_client.go) takes a strict http.Client type which disallows developers from customizing http.Client or providing their own implementation. I propose to replace this with an interface such as:
type HttpClient interface {
Do(req *http.Request) (*http.Response, error)
}
Do() is the only function of http.Client that is used (in THttpClient.Flush()).