new $.oNetwork($)
openHarmony/openHarmony_network.js, line 59
Network helper for HTTP methods.
Available under $.network
Available under $.network
| Name | Type | Description |
|---|---|---|
$ |
dom | The connection back to the DOM. |
Methods
-
downloadMulti(instructions, replace)
openHarmony/openHarmony_network.js, line 319 -
Threads multiple downloads at a time [10 concurrent]. Downloads a from the internet at the given addresses
Note, only implemented with useCurl=true.Name Type Description instructionsArray.<object> The instructions for download, in format [ { "path": localPathOnDisk, "url":"DownloadPath" } ] replacebool Replace the file if it exists. -
downloadSingle(address, path, replace)
openHarmony/openHarmony_network.js, line 277 -
Downloads a file from the internet at the given address
Note, only implemented with useCurl=true.Name Type Description addressstring The address for the file to be downloaded. pathfunction The local file path to save the download. replacebool Replace the file if it exists. -
webQuery(address, callback_func, use_json)
openHarmony/openHarmony_network.js, line 92 -
Connects to HTTP and gets the text response from a web site/API.
Note, Harmony has issues with HTTPS, useCurl=true prevents thisName Type Description addressstring The address for the web query. callback_funcfunction Providing a callback function prevents blocking, and will respond on this function. The callback function is in form func( results ){} use_jsonbool In the event of a JSON api, this will return an object converted from the returned JSON.