From 92a046f2623b1fbb586bb3856f3bdc415fcdbde0 Mon Sep 17 00:00:00 2001 From: Sachin Krishna Shelar Date: Mon, 30 Oct 2017 12:47:10 +0530 Subject: [PATCH] code refactor to remove duplicate defination of http_request --- lib/client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client.js b/lib/client.js index ad954c1..a030d05 100644 --- a/lib/client.js +++ b/lib/client.js @@ -99,12 +99,12 @@ function Client (globalRequest, maxSockets) { // API is the main interface to the API. this.API = function (endpointRequest, callback) { var request = buildRequest(globalRequest, endpointRequest) - + var http_request; if ( endpointRequest.test == true ) { - var http_request = http + http_request = http request.port = endpointRequest.port } else { - var http_request = https + http_request = https } var httpRequest = http_request.request(request, function (httpResponse) {