async Task<string> GetAndSaveImageAsync(string url) { string imageName = $"{Guid.NewGuid()}.png"; string filePath = System.IO.Path.Combine(_webHostEnvironment.ContentRootPath, "Resources","Images"); if (!Directory.Exists(filePath)) { Directory.CreateDirectory(filePath); } var httpRequest = new HttpRequestMessage(HttpMethod.Get, url); using (var httpClient = new HttpClient()) { var response = httpClient.SendAsync(httpRequest).Result; if (response.StatusC...
Gives you back end support so you save time!