Use modern HttpClient

(cherry picked from commit 402f8b296f17bf161824ec5ff40d67d036d00d94)
This commit is contained in:
ta264
2021-11-10 21:59:08 +00:00
parent 5f946c0aa3
commit cef15887a4
39 changed files with 372 additions and 318 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using NLog;
using NzbDrone.Common.Cache;
using NzbDrone.Common.Extensions;
@@ -71,7 +72,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
};
indexRequestBuilder.SetCookies(cookies);
indexRequestBuilder.Method = HttpMethod.POST;
indexRequestBuilder.Method = HttpMethod.Post;
indexRequestBuilder.Resource("ajax.php?action=index");
var authIndexRequest = indexRequestBuilder
@@ -92,7 +93,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
LogResponseContent = true
};
requestBuilder.Method = HttpMethod.POST;
requestBuilder.Method = HttpMethod.Post;
requestBuilder.Resource("login.php");
requestBuilder.PostProcess += r => r.RequestTimeout = TimeSpan.FromSeconds(15);