gravity.js
function wget(fileURL, callback) {
		var
			chunks = [],
			isHTTPS = fileURL.indexOf('https') === 0,
			client = isHTTPS ? https : http,
			options = fileURL
		;
		if (isHTTPS) {
			options = url.parse(fileURL);
			options.rejectUnauthorized = false;
			options.agent = new https.Agent(options);
		}
		client.get(options, function (res) {
			res.on('data', function (chunk) {
				chunks.push(chunk);
			}).on('end', function () {
				callback(null, joinBuffers(chunks));
			});
		});
	}
function wget(fileURL, callback) {
		var
			chunks = [],
			isHTTPS = fileURL.indexOf('https') === 0,
			client = isHTTPS ? https : http,
			options = fileURL
		;
		if (isHTTPS) {
			options = url.parse(fileURL);
			options.rejectUnauthorized = false;
			options.agent = new https.Agent(options);
		}
		client.get(options, function (res) {
			res.on('data', function (chunk) {
				chunks.push(chunk);
			}).on('end', function () {
				callback(null, joinBuffers(chunks));
			});
		});
	}
function wget ( fileURL , callback ) { var chunks = [ ] , isHTTPS = fileURL . indexOf ( 'https' ) === 0 , client = isHTTPS ? https : http , options = fileURL ; if ( isHTTPS ) { options = url . parse ( fileURL ) ; options . rejectUnauthorized = false ; options . agent = new https . Agent ( options ) ; } client . get ( options , function ( res ) { res . on ( 'data' , function ( chunk ) { chunks . push ( chunk ) ; } ) . on ( 'end' , function ( ) { callback ( null , joinBuffers ( chunks ) ) ; } ) ; } ) ; }
Given a web URL, fetch the file contents.
Given a web URL fetch the file contents .