1.1.1 • Published 6 years ago

fetch-download v1.1.1

Weekly downloads
5
License
GPL-3.0
Repository
github
Last release
6 years ago

fetch-download

A package to download files with javascript using the fetch interface

Usage

fetchDownload(url, options?)
Returns a promise, failing if the response has a error status or connection error. The second parameter is an options object that will be passed to the native fetch

fetchDownload=require('fetch-download');

fetchDownload(url).catch((err)=>{
    console.error(err); // {status: 404}
});
1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago