# Class: oNetwork

## $. oNetwork

Network Helper Class

#### new $.oNetwork($)

openHarmony/openHarmony_network.js, line 59
  Network helper for HTTP methods.
  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
  --- | --- | ---
  `instructions` | Array.<object> | The instructions for download, in format [ { "path": localPathOnDisk, "url":"DownloadPath" } ]
  `replace` | bool | 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
  --- | --- | ---
  `address` | string | The address for the file to be downloaded.
  `path` | function | The local file path to save the download.
  `replace` | bool | 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 this

  Name | Type | Description
  --- | --- | ---
  `address` | string | The address for the web query.
  `callback_func` | function | Providing a callback function prevents blocking, and will respond on this function. The callback function is in form func( results ){}
  `use_json` | bool | In the event of a JSON api, this will return an object converted from the returned JSON.