Files
Prowlarr/src/NzbDrone.Core/Rest/RestClientFactory.cs
T
2014-11-25 07:28:49 -08:00

25 lines
645 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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("Sonarr/{0} (RestSharp/{1}; {2}/{3})",
BuildInfo.Version,
restClient.GetType().Assembly.GetName().Version,
OsInfo.Os, OsInfo.Version.ToString(2));
return restClient;
}
}
}