get-json-data
v0.1.2
Published
Make ajax request to get the json data.
Downloads
15
Readme
get-json-data
Make ajax request to get the json data from browser. Not for nodejs, use request module instead.
usage
can not be more simpler:
include index.js
in your html.
getJSONData(url,callback);
//callback function
fucntion callback(err, data) {
if (err) {
console.log('request failed');
return;
}
// do something with data
}
note
This module does not support jsonp. For jsonp request you may use jsonp module.
similar
Here is list of other popular and stable projects
- superagent
- axios
- qwest
- A Comparison of JavaScript HTTP Libraries for the Browser
- when
- promise
- async
- Loading JSON-formatted data with Ajax and xhr.responseType='json'
- Cross-Origin Resource Sharing (CORS) AJAX Requests Between jQuery And Node.js
##License This project is licensed under the terms of the MIT license.