lib/runner.js
function request(requestOptions, callback) {
	var debug = require('debug')('analyze-css:http'),
		fetch = require('node-fetch');

	debug('GET %s', requestOptions.url);
	debug('Options: %j', requestOptions);

	fetch(requestOptions.url, requestOptions).
	then(function(resp) {
		debug('HTTP %d %s', resp.status, resp.statusText);
		debug('Headers: %j', resp.headers._headers);

		if (!resp.ok) {
			var err = new Error('HTTP request failed: ' + (err ? err.toString() : 'received HTTP ' + resp.status + ' ' + resp.statusText));
			callback(err);
		} else {
			return resp.text(); // a promise
		}
	}).
	then(function(body) {
		debug('Received %d bytes of CSS', body.length);
		callback(null, body);
	}).
	catch(function(err) {
		debug(err);
		callback(err);
	});
}
function request(requestOptions, callback) {
	var debug = require('debug')('analyze-css:http'),
		fetch = require('node-fetch');

	debug('GET %s', requestOptions.url);
	debug('Options: %j', requestOptions);

	fetch(requestOptions.url, requestOptions).
	then(function(resp) {
		debug('HTTP %d %s', resp.status, resp.statusText);
		debug('Headers: %j', resp.headers._headers);

		if (!resp.ok) {
			var err = new Error('HTTP request failed: ' + (err ? err.toString() : 'received HTTP ' + resp.status + ' ' + resp.statusText));
			callback(err);
		} else {
			return resp.text(); // a promise
		}
	}).
	then(function(body) {
		debug('Received %d bytes of CSS', body.length);
		callback(null, body);
	}).
	catch(function(err) {
		debug(err);
		callback(err);
	});
}
function request ( requestOptions , callback ) { var debug = require ( 'debug' ) ( 'analyze-css:http' ) , fetch = require ( 'node-fetch' ) ; debug ( 'GET %s' , requestOptions . url ) ; debug ( 'Options: %j' , requestOptions ) ; fetch ( requestOptions . url , requestOptions ) . then ( function ( resp ) { debug ( 'HTTP %d %s' , resp . status , resp . statusText ) ; debug ( 'Headers: %j' , resp . headers . _headers ) ; if ( ! resp . ok ) { var err = new Error ( 'HTTP request failed: ' + ( err ? err . toString ( ) : 'received HTTP ' + resp . status + ' ' + resp . statusText ) ) ; callback ( err ) ; } else { return resp . text ( ) ; // a promise } } ) . then ( function ( body ) { debug ( 'Received %d bytes of CSS' , body . length ) ; callback ( null , body ) ; } ) . catch ( function ( err ) { debug ( err ) ; callback ( err ) ; } ) ; }
Simplified implementation of "request" npm module

@see https://www.npmjs.com/package/node-fetch
Simplified implementation of request npm module