Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image with https src doesn't work #4

Open
noBloodOnTheLeaves opened this issue Jan 21, 2024 · 1 comment
Open

Image with https src doesn't work #4

noBloodOnTheLeaves opened this issue Jan 21, 2024 · 1 comment

Comments

@noBloodOnTheLeaves
Copy link

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

@noBloodOnTheLeaves noBloodOnTheLeaves changed the title Image with src from https doesn't work Image with https src doesn't work Jan 21, 2024
@noBloodOnTheLeaves
Copy link
Author

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant