load-json

0.0.1 • Public • Published

node-load-json

Simple utility to do a json request

npm install load-json --save

Example

var getJson=require('load-json')
//options will be appended as query string, like ?searchTerm1=test&sort=column2&order=desc
var options={
  searchTerm1: 'test',
  sort: 'column2',
  order: 'desc'
}
getJson('http://my.cool.api/json/', options, function(e, response){
   if(e)
       return console.log(e)
   console.log(response)//this is an object
})
 

Package Sidebar

Install

npm i load-json

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • gusnips