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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    14
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    14
  • 1.0.0
    2

Package Sidebar

Install

npm i tr-jsonget

Weekly Downloads

2

Version

1.0.1

License

GPL-2.0

Unpacked Size

20.5 kB

Total Files

6

Last publish

Collaborators

  • rinne