easypost-csharp
easypost-csharp copied to clipboard
Add support to proxy servers
We have a few customers that do not have direct Internet connection from their shipping machines because of company polices and instead are using local network proxy servers to communicate with outside world. For instance a customer’s PC can’t access https://onlinetools.ups.com/webservices (UPS API endpoint) directly , instead we let them to enter their proxy server URL and credentials in our software and set underlying connection’s (either SoapHttpClientProtocol or HttpWebRequest) Proxy property. If it is set, all outbound requests goes through this proxy URL. We would like to see similar proxy support in Easypost client.
Thanks.
You can change the underlying url to make requests to by setting it on ClientConfiguration
.
https://github.com/EasyPost/easypost-csharp#configuration
Does this solve your issues?
In our case proxy server needs additional credentials that we need to pass. System.Net.Webproxy handles it .
What kind of authentication are you using? Basic Auth?
Honestly, not sure. We are setting this property - https://msdn.microsoft.com/en-us/library/system.net.webproxy.credentials(v=vs.110).aspx
This could be a pretty major change to how the client and request work. I have been wanting to make a change that would support something like this. I'll take a look and see how complicated it would be.
This items isn't on our immediate roadmap; however, we are open to pull requests if someone wants to take a stab at it.
@Godd67 I am exploring the scope of the work for this. It seems fairly trivial. Is this still a requirement?