mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Fixed: RestClient does not use global proxy settings
Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
@@ -23,10 +23,12 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
||||
{
|
||||
private const string PUSH_URL = "https://api.pushbullet.com/v2/pushes";
|
||||
private const string DEVICE_URL = "https://api.pushbullet.com/v2/devices";
|
||||
private readonly IRestClientFactory _restClientFactory;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public PushBulletProxy(Logger logger)
|
||||
public PushBulletProxy(IRestClientFactory restClientFactory, Logger logger)
|
||||
{
|
||||
_restClientFactory = restClientFactory;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -96,7 +98,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
||||
{
|
||||
try
|
||||
{
|
||||
var client = RestClientFactory.BuildClient(DEVICE_URL);
|
||||
var client = _restClientFactory.BuildClient(DEVICE_URL);
|
||||
var request = new RestRequest(Method.GET);
|
||||
|
||||
client.Authenticator = new HttpBasicAuthenticator(settings.ApiKey, string.Empty);
|
||||
@@ -174,7 +176,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
||||
{
|
||||
try
|
||||
{
|
||||
var client = RestClientFactory.BuildClient(PUSH_URL);
|
||||
var client = _restClientFactory.BuildClient(PUSH_URL);
|
||||
|
||||
request.AddParameter("type", "note");
|
||||
request.AddParameter("title", title);
|
||||
|
||||
Reference in New Issue
Block a user