npm.io
1.2.1 • Published 5 years ago

calladownload

Licence
ISC
Version
1.2.1
Deps
1
Size
9 kB
Vulns
0
Weekly
0
Stars
1

calladownload

GitHub code size in bytes GitHub package.json version GitHub

A native library to download a file from http or https

Installation

npm install --save calladownload

Example

With callbacks
calladownload(`http://example.com/index.html`, '/tmp/index.html', function (error) {
  console.log(error ? error : 'Downloaded successfully')
})
With promises
await calladownload(`http://example.com/index.html`, '/tmp/index.html')
console.log('Downloaded successfully');

License

This project is licensed under the terms of the MIT license.

Keywords