mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-23 11:34:16 +02:00
Fix setting of version policy
This commit is contained in:
@ -7,13 +7,13 @@ internal class HttpDownloadClient : DownloadClient
|
|||||||
{
|
{
|
||||||
private static readonly HttpClient Client = new()
|
private static readonly HttpClient Client = new()
|
||||||
{
|
{
|
||||||
Timeout = TimeSpan.FromSeconds(10)
|
Timeout = TimeSpan.FromSeconds(10),
|
||||||
|
DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher
|
||||||
};
|
};
|
||||||
|
|
||||||
public HttpDownloadClient()
|
public HttpDownloadClient()
|
||||||
{
|
{
|
||||||
Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", TrangaSettings.userAgent);
|
Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", TrangaSettings.userAgent);
|
||||||
Client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override RequestResult MakeRequestInternal(string url, string? referrer = null, string? clickButton = null)
|
internal override RequestResult MakeRequestInternal(string url, string? referrer = null, string? clickButton = null)
|
||||||
|
Reference in New Issue
Block a user