Revert "core: refactor http webclient part 1 #8529 (#7652)"

This reverts commit 0bdcfd1e7b.
This commit is contained in:
ngosang
2020-09-21 08:04:26 +02:00
parent 9c492c5dcb
commit 1271ecaa4c
90 changed files with 380 additions and 380 deletions

View File

@@ -125,9 +125,9 @@ namespace Jackett.Common.Indexers
{
var jsonData = JsonConvert.SerializeObject(data);
var result = await PostDataWithCookies(APIUrl + endpoint, null, null, SiteLink, APIHeaders, jsonData);
if (!result.ContentString.StartsWith("{")) // not JSON => error
throw new ExceptionWithConfigData(result.ContentString, configData);
dynamic json = JsonConvert.DeserializeObject<dynamic>(result.ContentString);
if (!result.Content.StartsWith("{")) // not JSON => error
throw new ExceptionWithConfigData(result.Content, configData);
dynamic json = JsonConvert.DeserializeObject<dynamic>(result.Content);
return json;
}