core: refactor http webclient part 13 #8529 (#8941)

Merge string/byte request code
This commit is contained in:
Cory
2020-06-11 10:09:27 -05:00
committed by ngosang
parent 22bced9ca3
commit 4d63fa81d5
91 changed files with 330 additions and 399 deletions

View File

@@ -12,6 +12,7 @@ using Jackett.Common.Models;
using Jackett.Common.Models.IndexerConfig;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using WebClient = Jackett.Common.Utils.Clients.WebClient;
@@ -196,12 +197,12 @@ namespace Jackett.Common.Indexers.Abstract
searchUrl += "?" + queryCollection.GetQueryString();
var response = await RequestStringWithCookiesAndRetry(searchUrl);
var response = await RequestWithCookiesAndRetryAsync(searchUrl);
if (response.IsRedirect)
{
// re-login
await ApplyConfiguration(null);
response = await RequestStringWithCookiesAndRetry(searchUrl);
response = await RequestWithCookiesAndRetryAsync(searchUrl);
}
try