Skip to content

Commit

Permalink
fix(httpClient): use http_client from constructor instead of using or…
Browse files Browse the repository at this point in the history
…iginal axios
  • Loading branch information
cahyonobagus committed Mar 12, 2021
1 parent 9adce62 commit 1c7e966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/httpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -50,7 +50,7 @@ class HttpClient{
}
}

let response = axios({
let response = this.http_client({
method: httpMethod,
headers: headers,
url: requestUrl,
Expand Down

0 comments on commit 1c7e966

Please sign in to comment.