Update HttpClientManager.cs

This commit is contained in:
pointfeev 2022-03-04 18:58:45 -05:00
parent aaffd43168
commit be28b0db3e

View file

@ -31,7 +31,10 @@ internal static class HttpClientManager
document.LoadHtml(reader.ReadToEnd());
return document;
}
catch { return null; }
catch
{
return null;
}
}
internal static async Task<HtmlNodeCollection> GetDocumentNodes(string url, string xpath) => (await Get(url))?.DocumentNode?.SelectNodes(xpath);
@ -42,8 +45,10 @@ internal static class HttpClientManager
{
return new Bitmap(await HttpClient.GetStreamAsync(url));
}
catch { }
return null;
catch
{
return null;
}
}
internal static void Dispose() => HttpClient.Dispose();