@navservice/core 1.58.0 → 1.59.0
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/build/es/utils/_api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from "axios";
|
|
2
2
|
export default class api {
|
|
3
|
-
|
|
3
|
+
static get axios(): AxiosInstance;
|
|
4
4
|
private static withAuth;
|
|
5
5
|
private static get_headers;
|
|
6
6
|
static get<T = any>({ url, params, setToken }: {
|
package/build/es/utils.js
CHANGED
|
@@ -52,12 +52,14 @@ class config_env {
|
|
|
52
52
|
}
|
|
53
53
|
const src_config_env = config_env;
|
|
54
54
|
class api {
|
|
55
|
-
static
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
static get axios() {
|
|
56
|
+
return axios.create({
|
|
57
|
+
baseURL: src_config_env.PUBLIC_BASE_URL_BACKEND_PRINCIPAL,
|
|
58
|
+
headers: {
|
|
59
|
+
"Content-Type": "application/json"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
61
63
|
static withAuth = true;
|
|
62
64
|
static get_headers(setToken) {
|
|
63
65
|
if (true === setToken && true === this.withAuth) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from "axios";
|
|
2
2
|
export default class api {
|
|
3
|
-
|
|
3
|
+
static get axios(): AxiosInstance;
|
|
4
4
|
private static withAuth;
|
|
5
5
|
private static get_headers;
|
|
6
6
|
static get<T = any>({ url, params, setToken }: {
|
package/build/lib/utils.cjs
CHANGED
|
@@ -117,12 +117,14 @@ class config_env {
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
class api {
|
|
120
|
-
static axios
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
static get axios() {
|
|
121
|
+
return external_axios_default().create({
|
|
122
|
+
baseURL: src_config_env.PUBLIC_BASE_URL_BACKEND_PRINCIPAL,
|
|
123
|
+
headers: {
|
|
124
|
+
"Content-Type": "application/json"
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
126
128
|
static withAuth = true;
|
|
127
129
|
static get_headers(setToken) {
|
|
128
130
|
if (setToken === true && this.withAuth === true) {
|