Skip to content

shuttlecloud/fetch-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}
});

About

A package to download files using the fetch interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published