var request = require('request');
var url = 'http://lorempixel.com/50/50/'
request(url, {}, function (error, response, body) {
if (!error) {
console.log(typeof(body), body.length, response.headers['content-length'], body.length == response.headers['content-length'])
} else {
console.log('error', error);
}
console.log('finished');
});
// suppress the direct output of the call. you can expand the result below
"loading..."