GitHub30/toast-notification-examples

Image with https src doesn't work

noBloodOnTheLeaves opened this issue · 1 comments

I tried to repeat Messaging example.
But image didn't show.

Alternative solution - download picture to local folder and use it.

#get cat photo from api
$image = Invoke-WebRequest -Uri 'https://api.thecatapi.com/v1/images/search?size=small' -Method Get
$jsonObj = ConvertFrom-Json $([String]::new($image.Content))

#download photo to local folder
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($jsonObj.url, "C:\Users\User\Pictures\test.jpg")