Found additional usages for (var web = new HttpClient()) and replaced with private static readonly HttpClient HttpClient = new HttpClient();

This commit is contained in:
RaduOrleanu
2018-08-17 15:21:33 +02:00
parent 051b595f82
commit 03e642fced

View File

@@ -92,8 +92,6 @@ namespace Umbraco.Web.Editors
//content is null, go get it
try
{
// using (var web = new HttpClient())
// {
//fetch remote css
content = await HttpClient.GetStringAsync(url);
@@ -102,7 +100,6 @@ namespace Umbraco.Web.Editors
//save server content for 30 mins
ApplicationContext.ApplicationCache.RuntimeCache.InsertCacheItem<string>(key, () => result, new TimeSpan(0, 30, 0));
// }
}
catch (HttpRequestException ex)
{