You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't remember all those changes. However, I think it may be good to start with default var transport = http.DefaultTransport
And having a set function for those that need to keep DefaultTransport as it is but want this transport different.
Do you have time help with a PR? I am lack of time and lock of development tools
Request
Reason :
I want to use it in a Proxy environment
Make a request
connection.go
Line:16
var transport = http.Transport{}
Don't initialize with empty, just use
DefaultTransport
or
or add the following function
func SetTransport(h http.Transport) {
transport = h
}
Example :
http.DefaultTransport = &http.Transport{ Proxy: http.ProxyURL(proxyUrl) }
I want to use defaultTransport and use it around like
Or
tr := &http.Transport{
ResponseHeaderTimeout: 30 * time.Second,
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 2 * time.Second,
}).DialContext,
MaxIdleConns: 0,
IdleConnTimeout: 30 * time.Second,
TLSHandshakeTimeout: 2 * time.Second, }),
Second, MaxIdleConnsPerHost: 100,
//DisableKeepAlives: false,
DisableKeepAlives: true,
}
solr.SetTransport(tr)
Please.
The text was updated successfully, but these errors were encountered: