Removes WebClient completely except for in an old legacy class that is not used for anything
any more (umbraco.cms.businesslogic.packager.Installer.Fetch).
This commit is contained in:
Sebastiaan Janssen
2018-09-26 13:27:16 +02:00
parent 540e4f17d6
commit a1224da5e1
6 changed files with 79 additions and 86 deletions

View File

@@ -198,12 +198,11 @@ namespace Umbraco.Web.Install
var packages = new List<Package>();
try
{
var requestUri = string.Format("https://our.umbraco.com/webapi/StarterKit/Get/?umbracoVersion={0}",
UmbracoVersion.Current);
var requestUri = $"https://our.umbraco.com/webapi/StarterKit/Get/?umbracoVersion={UmbracoVersion.Current}";
using (var request = new HttpRequestMessage(HttpMethod.Get, requestUri))
using (var response = _httpClient.SendAsync(request).Result)
{
var response = _httpClient.SendAsync(request).Result;
packages = response.Content.ReadAsAsync<IEnumerable<Package>>().Result.ToList();
}
}