get-json22
1.0.0 • Public • Published get-json
Cross-platform library for getting JSON documents. Wraps request on Node, fallsback to JSONP on browsers.
Usage
var getJSON = require('get-json')
getJSON('http://api.listenparadise.org', function(error, response){
console.log(error);
console.log(response);
});
Alternatively, you can use a Promise:
var getJSON = require('get-json')
getJSON('http://api.listenparadise.org')
.then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads