JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 827
  • Score
    100M100P100Q108793F
  • License MIT

wget in Node with Promise support, forked from bearjaws/node-wget

Package Exports

  • node-wget-promise

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-wget-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-wget-promise

node-wget-promise simplifies retrieving files from any URL, with Promise support.

npm Build Status styled with prettier

This package is forked and enhanced from wget-improved

Install

npm install node-wget-promise --save

wget(src, output, options)

var wget = require('node-wget-promise');
var src = 'http://nodejs.org/images/logo.svg';
var options = {
  onStart: <Callback>,
  onProgress: <Callback>,
  output: <outputFilePath>
  // see options below
};
wget(src, options)
  .then(result => <Result>)
  .catch(err => <Error>);

options

options = {}
// Set to true to have any gzip stream automatically decompressed before saving
options.gunzip = false;
options.proxy = {};
options.proxy.protocol = 'http';
options.proxy.host = 'someproxy.org';
options.proxy.port = 1337;
options.proxy.proxyAuth = '{basic auth}';
options.proxy.headers = {'User-Agent': 'Node'};

Todo

  • Enable gzip when using request method