I have env variable set for http_proxy, but with another call, I like to bypass proxy and use direct connection to destination server instead.
Is there any way I can do that in Go lang?
Thanks.
I have env variable set for http_proxy, but with another call, I like to bypass proxy and use direct connection to destination server instead.
Is there any way I can do that in Go lang?
Thanks.
I had that problem with a corporate proxy, even disabled the proxy url it was using it this was my solution
// reset proxy in http RoundTripper
var defaultTransport http.RoundTripper = &http.Transport{Proxy: nil}
client := &http.Client{Transport: defaultTransport}