use nodejs http lib directly to check service status
This commit is contained in:
parent
10b0f862a5
commit
38c98f16fa
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue