Add User Agent to MangaConnectors
This commit is contained in:
parent
97c0e42512
commit
7614f9aad3
@ -1,4 +1,5 @@
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Tranga.MangaConnectors;
|
namespace Tranga.MangaConnectors;
|
||||||
|
|
||||||
@ -6,7 +7,14 @@ internal class DownloadClient : GlobalBase
|
|||||||
{
|
{
|
||||||
private static readonly HttpClient Client = new()
|
private static readonly HttpClient Client = new()
|
||||||
{
|
{
|
||||||
Timeout = TimeSpan.FromSeconds(60)
|
Timeout = TimeSpan.FromSeconds(60),
|
||||||
|
DefaultRequestHeaders =
|
||||||
|
{
|
||||||
|
UserAgent =
|
||||||
|
{
|
||||||
|
new ProductInfoHeaderValue("Tranga", "0.1")
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly Dictionary<byte, DateTime> _lastExecutedRateLimit;
|
private readonly Dictionary<byte, DateTime> _lastExecutedRateLimit;
|
||||||
|
Loading…
Reference in New Issue
Block a user