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

Rename WebClientStringResult.Content to WebClientStringResult.ContentString
This commit is contained in:
Cory
2020-06-09 19:36:57 +02:00
committed by ngosang
parent cf34dfec8e
commit d760350dc0
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.Content.StartsWith("{")) // not JSON => error
throw new ExceptionWithConfigData(result.Content, configData);
dynamic json = JsonConvert.DeserializeObject<dynamic>(result.Content);
if (!result.ContentString.StartsWith("{")) // not JSON => error
throw new ExceptionWithConfigData(result.ContentString, configData);
dynamic json = JsonConvert.DeserializeObject<dynamic>(result.ContentString);
return json;
}