Skip to content

jobsteven/promisify-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promisify-fetch

The library is a wrapper for 'fetch' in promising way. It it commonly used for downloading files or get http content from the remote.

Usage

var fetch = require('promisify-fetch');

fetch
  .fetchURL('http://google.com')
  .then(function(body) {
    console.log(body);
  })
  .catch(function(e) {
    console.log(e);
  })

API

This is a primising wrapper for 'fetch' package. more specific options, please refer to fetch

/**
 * fetch url content from remote
 * @param  {string} url      url
 * @param  {object} options  Please refer to https://www.npmjs.com/package/fetch
 * @return {promise}         promise
 */

fetchURL(url[,options])

Inspired by fetch

Good Library Companions

About

The library is a wrapper for 'fetch' in promising way. It it commonly used for downloading files or get http content from the remote.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published