ar-design 0.2.39 → 0.2.40
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.
|
@@ -24,6 +24,9 @@ class Api {
|
|
|
24
24
|
return response;
|
|
25
25
|
}
|
|
26
26
|
async Post(values) {
|
|
27
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
28
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
29
|
+
}
|
|
27
30
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
28
31
|
method: "POST",
|
|
29
32
|
headers: { ...this.HeaderProperties(), ...values.headers },
|
|
@@ -33,6 +36,9 @@ class Api {
|
|
|
33
36
|
return response;
|
|
34
37
|
}
|
|
35
38
|
async PostWithFormData(values) {
|
|
39
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
40
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
41
|
+
}
|
|
36
42
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
37
43
|
method: "POST",
|
|
38
44
|
headers: { ...this.HeaderProperties(), ...values.headers },
|
|
@@ -42,6 +48,9 @@ class Api {
|
|
|
42
48
|
return response;
|
|
43
49
|
}
|
|
44
50
|
async Put(values) {
|
|
51
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
52
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
53
|
+
}
|
|
45
54
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
46
55
|
method: "PUT",
|
|
47
56
|
headers: {
|
|
@@ -54,6 +63,9 @@ class Api {
|
|
|
54
63
|
return response;
|
|
55
64
|
}
|
|
56
65
|
async Delete(values) {
|
|
66
|
+
if (values.input && values.input.toString().includes("?")) {
|
|
67
|
+
values.input = values.input.toString().replace(/\/(?=\?)/, "");
|
|
68
|
+
}
|
|
57
69
|
const response = await this.CustomFetch(`${this._url}${values.input}`, {
|
|
58
70
|
method: "DELETE",
|
|
59
71
|
headers: {
|