nectiasw 0.0.81 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -41606,12 +41606,10 @@ class HttpClient {
|
|
|
41606
41606
|
baseURL,
|
|
41607
41607
|
timeout: timeout2,
|
|
41608
41608
|
headers = {},
|
|
41609
|
-
logger = console.log,
|
|
41610
41609
|
requestInterceptor = (config2) => config2,
|
|
41611
41610
|
responseInterceptor = (response) => response
|
|
41612
41611
|
} = {}) {
|
|
41613
41612
|
__publicField(this, "https");
|
|
41614
|
-
__publicField(this, "logger");
|
|
41615
41613
|
__publicField(this, "requestInterceptor");
|
|
41616
41614
|
__publicField(this, "responseInterceptor");
|
|
41617
41615
|
this.https = axios.create({
|
|
@@ -41619,12 +41617,10 @@ class HttpClient {
|
|
|
41619
41617
|
timeout: timeout2,
|
|
41620
41618
|
headers
|
|
41621
41619
|
});
|
|
41622
|
-
this.logger = logger;
|
|
41623
41620
|
this.requestInterceptor = this.https.interceptors.request.use(
|
|
41624
41621
|
requestInterceptor,
|
|
41625
41622
|
(error2) => {
|
|
41626
41623
|
var _a3;
|
|
41627
|
-
this.logger("requestError", error2);
|
|
41628
41624
|
if (((_a3 = error2.request) == null ? void 0 : _a3.status) === HttpStatusCode.Unauthorized) {
|
|
41629
41625
|
const event = new CustomEvent("@unauthorized", {
|
|
41630
41626
|
detail: error2
|
|
@@ -41638,7 +41634,6 @@ class HttpClient {
|
|
|
41638
41634
|
responseInterceptor,
|
|
41639
41635
|
(error2) => {
|
|
41640
41636
|
var _a3;
|
|
41641
|
-
this.logger("responseError", error2);
|
|
41642
41637
|
if (((_a3 = error2.response) == null ? void 0 : _a3.status) === HttpStatusCode.Unauthorized) {
|
|
41643
41638
|
const event = new CustomEvent("@unauthorized", {
|
|
41644
41639
|
detail: error2
|