nectiasw 0.0.80 → 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,11 @@ 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
|
-
|
|
41627
|
-
if (error2.status === HttpStatusCode.Unauthorized) {
|
|
41623
|
+
var _a3;
|
|
41624
|
+
if (((_a3 = error2.request) == null ? void 0 : _a3.status) === HttpStatusCode.Unauthorized) {
|
|
41628
41625
|
const event = new CustomEvent("@unauthorized", {
|
|
41629
41626
|
detail: error2
|
|
41630
41627
|
});
|
|
@@ -41636,8 +41633,8 @@ class HttpClient {
|
|
|
41636
41633
|
this.responseInterceptor = this.https.interceptors.response.use(
|
|
41637
41634
|
responseInterceptor,
|
|
41638
41635
|
(error2) => {
|
|
41639
|
-
|
|
41640
|
-
if (error2.status === HttpStatusCode.Unauthorized) {
|
|
41636
|
+
var _a3;
|
|
41637
|
+
if (((_a3 = error2.response) == null ? void 0 : _a3.status) === HttpStatusCode.Unauthorized) {
|
|
41641
41638
|
const event = new CustomEvent("@unauthorized", {
|
|
41642
41639
|
detail: error2
|
|
41643
41640
|
});
|