Download image from an URL

Hello everyone.

We would like to download an image - snapshot from an ip camera using URL and store file on the gateway as .jpg

URL path to this camera image is like this:

This task(script) would be executed on the gateway event. What syntax should we use to achive this?

Thank you for your help

Start with performing a GET request.

Thank you for pointing us in the right direction. We made it work.

Here is the code if anyone should need to do the same

url = ''
response =, timeout=20000)
image = response.getBody()
system.file.writeFile("C:/Folder/file.jpg", image)
1 Like

You've formatted your code using the quotation button instead of the code formatting button. We can read it in this case but for future posts see ...