Closed hrncacz closed 2 years ago
thank you for your suggestions.
i my opinion this code should be kept outside of this project to favor separation of concerns. the library cares about the protocol and less about the transport. on top it`s a more flexible and cleaner approach.
This should work in your project too, dosen`t it?
proxyUrlParsed, _ := url.Parse(proxyUrl)
c := d.NewClient(*root, *user, *password)
c.SetTransport( &http.Transport{Proxy: http.ProxyURL(proxyUrlParsed)} )
You are right. I have completely missed SetTransport. Thank you for advice.
You're welcome!
I'll keep this in mind to extend the documentation.
Hello,
I have used this module in one of my projects and I was missing functionality for defining proxy server directly from program. In my case I am not able to use env variables HTTP/HTTPS_PROXY. This new function NewClientProxy() solves that issue.