In the RestSharp v114.1 configuration API, an explicit network proxy is a client option:

var options = new RestClientOptions("https://api.example.com")
{
    Proxy = new WebProxy("http://proxy.example:8080")
};
using var client = new RestClient(options);

This fragment uses RestSharp and System.Net. The base URL names the API; the WebProxy address names the intermediary. On a supported runtime, a permitted public-API test without proxy authentication can use a candidate from the HTTP proxy list for that intermediary. Set any required proxy credentials on that WebProxy before constructing the client.

RestSharp turns constructor options into an immutable configuration. Inspecting client.Options is supported; changing the proxy there after construction is not the setup pattern. Keep the configured client for its work, and create a different configured client when the application needs a different route.

If you supply an existing HttpClient or a custom message handler, configure its transport yourself. RestSharp does not rebuild an externally owned handler from Proxy in the options. A route assigned to unused options cannot change a connection opened by that handler.

The documented Proxy option has platform limits, including browser, iOS and tvOS clients. Match the example to the runtime in use. Older RestSharp examples assigning a mutable client.Proxy property belong to another API generation.

Tënë sô zo