8000 GitHub - porsager/downit: Resumeable downloader for node
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

porsager/downit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎢 Downit - Resume downloads in node

Downit simply downloads a file from a URL to a destination on the disk, resuming previous progress if the server supports the Range header.

Install

npm i downit

Usage

downit(url, dest, [options])

const downit = require('downit')

downit(url, dest, {
  headers: { Authorization: 'Bearer Of Good News' },
  onprogress: (got, total) => console.log('Got ', got, 'B of ', total, 'B'),
  onrequest: req => { /* The node request instance */ },
  onresponse: res => { /* The node response instance */ }
}).then(() => {
  console.log('Downed it')
}).catch(e => {
  console.error('Dropped it, due to ', e)
})

CLI

Downit also works on the command line.

Installation

npm i downit -g

Usage

downit url [dest]

About

Resumeable downloader for node

Resources

Stars

Watchers

Forks

Packages

No packages published
0