From 1c7e966c17fa604f90e83371166379dc64a22a2d Mon Sep 17 00:00:00 2001 From: bagus cahyono Date: Fri, 12 Mar 2021 13:29:22 +0700 Subject: [PATCH] fix(httpClient): use http_client from constructor instead of using original axios --- lib/httpClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/httpClient.js b/lib/httpClient.js index 3da1141..38f1979 100644 --- a/lib/httpClient.js +++ b/lib/httpClient.js @@ -32,7 +32,7 @@ class HttpClient{ reqQueryParam = secondParam; } - return new Promise(function(resolve,reject){ + return new Promise((resolve,reject) => { // Reject if param is not JSON if(typeof reqBodyPayload === 'string' || reqBodyPayload instanceof String){ try{ @@ -50,7 +50,7 @@ class HttpClient{ } } - let response = axios({ + let response = this.http_client({ method: httpMethod, headers: headers, url: requestUrl,