Skip to content

http.download deprecated ​

Deprecated

Use web.download instead.

Downloads a file from a URL to the MODLR filesystem.

js
http.download(url, method, postData, saveAsFilename)

Parameters ​

ParameterTypeDescription
urlstringThe URL of the file.
methodstringGET or POST.
postDatastringThe data to post. Use "" for a GET request.
saveAsFilenamestringThe path to save the file as.

Returns ​

boolean

true if the file was downloaded, otherwise false.

Examples ​

js
const success = http.download("https://go.modlr.co/images/logo.png", "GET", "", "logo.png");