|
|
@ -128,6 +128,14 @@ client.prototype.request = function(method, path, params, callback){ |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// This should only occur for errors such as a socket hang up prior to any
|
|
|
|
|
|
// data being received, or SSL-related issues.
|
|
|
|
|
|
req.on('error', function(err) { |
|
|
|
|
|
if(typeof callback == 'function'){ |
|
|
|
|
|
callback(err, null, 0); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if(['POST', 'PUT'].indexOf(http_options['method']) >= 0){ |
|
|
if(['POST', 'PUT'].indexOf(http_options['method']) >= 0){ |
|
|
req.write(body); |
|
|
req.write(body); |
|
|
} |
|
|
} |
|
|
|