JQuery Code
var result;
$.get(‘request address‘,function(data){
result = $.parseJSON(data);
console.log(result)
});
referencehttp://api.jquery.com/jquery.get/
http://api.jquery.com/jQuery.ajax/
Node.js Code
var request = require(‘request’);
var result;
request(‘request address‘,function(err,res,body){
result = JSON.parse(body);
console.log(result);
});
referencehttps://github.com/mikeal/request
Recent Comments