25 lines
632 B
C#
Raw Permalink Normal View History

2022-04-10 03:38:39 +03:00
using System.Net.Http;
using System.Net.Http.Headers;
using System.Reflection;
2022-04-10 03:38:39 +03:00
namespace YoutubeDownloader.Core.Utils;
public static class Http
2022-04-10 03:38:39 +03:00
{
2023-10-21 17:58:59 +03:00
public static HttpClient Client { get; } =
new()
{
2023-10-21 17:58:59 +03:00
DefaultRequestHeaders =
{
2023-10-21 17:58:59 +03:00
// Required by some of the services we're using
UserAgent =
{
new ProductInfoHeaderValue(
"YoutubeDownloader",
Assembly.GetExecutingAssembly().GetName().Version?.ToString(3)
2024-09-01 23:25:50 +03:00
),
},
},
2023-10-21 17:58:59 +03:00
};
}