tr-jsonget

1.0.1 • Public • Published

In a Nutshell

Small promise-based utility function to http/https GET a JSON blob from URI and return it as a parsed object.

Reference

const jsonGet = require('tr-jsonget');
return (jsonGet('http://foo.bar/zap.json')
        .then(function(ret) {
          console.log('Oh yeah!');
          console.log(ret);
          return ret;
        })
        .catch(function(e) {
          console.log('Something terribly wrong');
          throw e;
        }));
      

Author

Timo J. Rinne tri@iki.fi

License

GPL-2.0

Package Sidebar

Install

npm i tr-jsonget

Weekly Downloads

1

Version

1.0.1

License

GPL-2.0

Unpacked Size

20.5 kB

Total Files

6

Last publish

Collaborators

  • rinne