NOTE: Samples in this file apply only to packages that follow Azure SDK Design Guidelines. Names of such packages usually start with Azure
.
To modify the retry options use the Retry
property of client options class.
Be default clients are setup to retry 3 times with exponential retry kind and initial delay of 0.8 sec.
SecretClientOptions options = new SecretClientOptions()
{
Retry =
{
Delay = TimeSpan.FromSeconds(2),
MaxRetries = 10,
Mode = RetryMode.Fixed
}
};
using HttpClient client = new HttpClient();
SecretClientOptions options = new SecretClientOptions
{
Transport = new HttpClientTransport(client)
};
using HttpClient client = new HttpClient(
new HttpClientHandler()
{
Proxy = new WebProxy(new Uri("http://example.com"))
});
SecretClientOptions options = new SecretClientOptions
{
Transport = new HttpClientTransport(client)
};