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
| Parameter | Type | Description |
|---|---|---|
url | string | The URL of the file. |
method | string | GET or POST. |
postData | string | The data to post. Use "" for a GET request. |
saveAsFilename | string | The path to save the file as. |
Returns
booleantrue if the file was downloaded, otherwise false.
Examples
js
const success = http.download("https://go.modlr.co/images/logo.png", "GET", "", "logo.png");