Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the Proxy no longer works as documented #10

Open
daveloper80 opened this issue Nov 20, 2024 · 0 comments
Open

Setting the Proxy no longer works as documented #10

daveloper80 opened this issue Nov 20, 2024 · 0 comments

Comments

@daveloper80
Copy link

daveloper80 commented Nov 20, 2024

In Advanced.MD it is suggested that you set a proxy server using:

this.httpClient.Proxy = new WebProxy(host, port);

However RestClient no longer supports this and sets the proxy via options.

I have tried to set the proxy this way but it does not seem to work

var proxy = new WebProxy()
{
    Address = new Uri(host),
    BypassProxyOnLocal = true,
};           
var options = new RestClientOptions("https://api.smartsheet.com/2.0")
{
    Proxy = proxy
};
this.httpClient = new RestClient(options);

Edit - I had a secondary issue going on but I believe this IS the correct way to set your proxy now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant