in reference-implementations/semantic-search-for-images/src/ingestion/Services/ImageService.cs [39:50]
public async Task<Stream> DownloadImage(string imageUrl) {
CheckForNullImageUrl(imageUrl);
_logger.LogInformation($"Downloading image from: {imageUrl}");
var imageResponse = await _httpClient.GetAsync(imageUrl);
imageResponse.EnsureSuccessStatusCode();
_logger.LogInformation($"Downloaded image from: {imageUrl}");
return await imageResponse.Content.ReadAsStreamAsync();
}