core: refactor http webclient part 4 #8529 (#7653)

Change byte result name to ContentBytes in preparation for merge
This commit is contained in:
Cory
2020-03-14 18:58:50 -05:00
committed by ngosang
parent abb8526b76
commit 4dd6da4f6e
18 changed files with 26 additions and 26 deletions

View File

@@ -404,12 +404,12 @@ namespace Jackett.Common.Indexers
if (response.Status != System.Net.HttpStatusCode.OK && response.Status != System.Net.HttpStatusCode.Continue && response.Status != System.Net.HttpStatusCode.PartialContent)
{
logger.Error("Failed download cookies: " + CookieHeader);
if (response.Content != null)
logger.Error("Failed download response:\n" + Encoding.UTF8.GetString(response.Content));
if (response.ContentBytes != null)
logger.Error("Failed download response:\n" + Encoding.UTF8.GetString(response.ContentBytes));
throw new Exception($"Remote server returned {response.Status.ToString()}" + (response.IsRedirect ? " => " + response.RedirectingTo : ""));
}
return response.Content;
return response.ContentBytes;
}
protected async Task<WebClientByteResult> RequestBytesWithCookiesAndRetry(string url, string cookieOverride = null, RequestType method = RequestType.GET, string referer = null, IEnumerable<KeyValuePair<string, string>> data = null)