@injectivelabs/utils
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -5,3 +5,3 @@ import { AxiosRequestConfig } from 'axios'; | ||
private config; | ||
constructor(endpoint: string); | ||
constructor(endpoint: string, options?: Record<string, any>); | ||
setConfig(config: AxiosRequestConfig): HttpClient; | ||
@@ -8,0 +8,0 @@ get<T, P>(endpoint: string, params?: T): Promise<P>; |
@@ -8,10 +8,9 @@ "use strict"; | ||
class HttpClient { | ||
constructor(endpoint) { | ||
constructor(endpoint, options = { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}) { | ||
this.config = {}; | ||
this.client = axios_1.default.create({ | ||
baseURL: endpoint, | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
this.client = axios_1.default.create(Object.assign({ baseURL: endpoint }, options)); | ||
this.config = {}; | ||
@@ -18,0 +17,0 @@ } |
{ | ||
"name": "@injectivelabs/utils", | ||
"description": "List of utils and helper functions that can be reused throughout Injective's projects.", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"author": { | ||
@@ -43,3 +43,3 @@ "name": "Bojan Angjelkoski", | ||
}, | ||
"gitHead": "377705969bf1dd34c5a344ba3999290ab79a1f21" | ||
"gitHead": "554b7c6e44ef563b46b82491cb4757575c51e6c9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80664
1067