lib/cli/in.js
function(url, callback) {
	logger('Fetching URL resource: ' + url);

	request(url, function (error, response, body) {
		if (!error && response.statusCode == 200) {
			callback(body);
		} else {
			var errorString = [
				'There was an error loading the requested resource',
				'>>> ' + url
			];
			if (error) {
				errorString.push(error.toString('utf8'));
			}
			errorHandler(errorString.join('\n'));
		}
	});
}
function(url, callback) {
	logger('Fetching URL resource: ' + url);

	request(url, function (error, response, body) {
		if (!error && response.statusCode == 200) {
			callback(body);
		} else {
			var errorString = [
				'There was an error loading the requested resource',
				'>>> ' + url
			];
			if (error) {
				errorString.push(error.toString('utf8'));
			}
			errorHandler(errorString.join('\n'));
		}
	});
}
function ( url , callback ) { logger ( 'Fetching URL resource: ' + url ) ; request ( url , function ( error , response , body ) { if ( ! error && response . statusCode == 200 ) { callback ( body ) ; } else { var errorString = [ 'There was an error loading the requested resource' , '>>> ' + url ] ; if ( error ) { errorString . push ( error . toString ( 'utf8' ) ) ; } errorHandler ( errorString . join ( '\n' ) ) ; } } ) ; }
Fetches a remote JSON document and generate
the schema based on the contents of the remote
resource. If an output directory is specified,
the document will be saved locally.

@param {String} url - The location of the remote resource
@param {Function} callback
Fetches a remote JSON document and generate the schema based on the contents of the remote resource . If an output directory is specified the document will be saved locally .