From 38c98f16fa0aeee202784bcc46b79c7491464e80 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 18 Feb 2017 23:17:43 -0500 Subject: [PATCH] use nodejs http lib directly to check service status --- lib/utils.js | 8 +++++--- package.json | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index f1b032dd1..c512d0a75 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -2,7 +2,7 @@ var path = require('path'); var grunt = require('grunt'); var merge = require('merge'); -var request = require('request'); +var http = require('http'); var shelljs = require('shelljs'); function joinPath() { @@ -22,8 +22,10 @@ function recursiveMerge(target, source) { } function checkIsAvailable(url, callback) { - request(url, function(error, response, body) { - callback(!error); + http.get(url, function(res) { + callback(true); + }).on('error', function(res) { + callback(false); }); } diff --git a/package.json b/package.json index 2caf892b3..6299050cb 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "fs-extra": "^2.0.0", "grunt": "^1.0.1", "merge": "^1.2.0", - "request": "^2.75.0", "serve-static": "^1.11.1", "shelljs": "^0.5.0", "solc": "0.4.8",