mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-01-17 10:17:55 -05:00
reorganized project
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System.Net;
|
||||
using Cleanuparr.Domain.Enums;
|
||||
|
||||
namespace Cleanuparr.Infrastructure.Http.DynamicHttpClientSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration for a dynamic HTTP client
|
||||
/// </summary>
|
||||
public class HttpClientConfig
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public int Timeout { get; set; }
|
||||
public HttpClientType Type { get; set; }
|
||||
public RetryConfig? RetryConfig { get; set; }
|
||||
|
||||
// Deluge-specific settings
|
||||
public bool AllowAutoRedirect { get; set; } = true;
|
||||
public DecompressionMethods AutomaticDecompression { get; set; } = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
|
||||
public CertificateValidationType CertificateValidationType { get; set; } = CertificateValidationType.Enabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retry configuration for HTTP clients
|
||||
/// </summary>
|
||||
public class RetryConfig
|
||||
{
|
||||
public int MaxRetries { get; set; }
|
||||
public bool ExcludeUnauthorized { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Types of HTTP clients that can be configured
|
||||
/// </summary>
|
||||
public enum HttpClientType
|
||||
{
|
||||
Default,
|
||||
WithRetry,
|
||||
Deluge
|
||||
}
|
||||
Reference in New Issue
Block a user