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

This reverts commit 4d63fa81d5.
This commit is contained in:
ngosang
2020-09-21 08:02:53 +02:00
parent 9d5636cc19
commit ca61f965e9
91 changed files with 399 additions and 330 deletions

View File

@@ -151,7 +151,7 @@ namespace Jackett.Common.Indexers
{ "password", configData.Password.Value }
};
var result = await WebRequestWithCookiesAsync(LoginUrl, "", RequestType.POST, data: pairs);
var result = await PostDataWithCookies(LoginUrl, pairs, "");
await ConfigureIfOK(result.Cookies, result.Cookies != null, () =>
{
@@ -174,12 +174,12 @@ namespace Jackett.Common.Indexers
{"category", "0"} // multi cat search not supported
};
var results = await WebRequestWithCookiesAsync(BrowseUrl, method: RequestType.POST, data: pairs);
var results = await PostDataWithCookies(BrowseUrl, pairs);
if (results.IsRedirect)
{
// re-login
await ApplyConfiguration(null);
results = await WebRequestWithCookiesAsync(BrowseUrl, method: RequestType.POST, data: pairs);
results = await PostDataWithCookies(BrowseUrl, pairs);
}
try