mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
21 lines
556 B
C#
21 lines
556 B
C#
using RestSharp;
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
|
|
namespace NzbDrone.Core.Rest
|
|
{
|
|
public static class RestClientFactory
|
|
{
|
|
public static RestClient BuildClient(string baseUrl)
|
|
{
|
|
var restClient = new RestClient(baseUrl);
|
|
|
|
restClient.UserAgent = string.Format("Radarr/{0} (RestSharp/{1}; {2}/{3})",
|
|
BuildInfo.Version,
|
|
restClient.GetType().Assembly.GetName().Version,
|
|
OsInfo.Os, OsInfo.Version.ToString(2));
|
|
|
|
return restClient;
|
|
}
|
|
}
|
|
}
|