@bchr/bchr-front-lib 0.3.130 → 0.3.131
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/lib/services/HttpService.js +20 -18
- package/package.json +1 -1
- package/src/services/HttpService.js +20 -17
|
@@ -129,26 +129,27 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
129
129
|
|
|
130
130
|
if (!rpcMethodName) {
|
|
131
131
|
rpcMethodName = "";
|
|
132
|
-
}
|
|
132
|
+
} // if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
133
|
+
//
|
|
134
|
+
// }
|
|
133
135
|
|
|
134
|
-
if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
135
|
-
if (jsonObject) {
|
|
136
|
-
ajaxOptions.data = jsonObject;
|
|
137
|
-
}
|
|
138
136
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
if (jsonObject) {
|
|
138
|
+
ajaxOptions.data = jsonObject;
|
|
139
|
+
}
|
|
142
140
|
|
|
143
|
-
|
|
144
|
-
ajaxOptions.
|
|
141
|
+
if (ajaxOptions.rpcMethodName) {
|
|
142
|
+
delete ajaxOptions.rpcMethodName;
|
|
143
|
+
}
|
|
145
144
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
145
|
+
ajaxOptions.type = "post";
|
|
146
|
+
ajaxOptions.dataType = "json";
|
|
149
147
|
|
|
150
|
-
|
|
148
|
+
if (!ajaxOptions.url) {
|
|
149
|
+
ajaxOptions.url = this.requestContextPath + rpcMethodName;
|
|
151
150
|
}
|
|
151
|
+
|
|
152
|
+
return _jquery["default"].ajax(ajaxOptions);
|
|
152
153
|
}
|
|
153
154
|
}, {
|
|
154
155
|
key: "__postForMock",
|
|
@@ -264,11 +265,12 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
264
265
|
|
|
265
266
|
if (_jquery["default"].isPlainObject(ajaxOptions.data)) {
|
|
266
267
|
jsonObject = ajaxOptions.data;
|
|
267
|
-
}
|
|
268
|
+
} // if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
269
|
+
//
|
|
270
|
+
// }
|
|
268
271
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
+
|
|
273
|
+
return this.postJSONWithNotCareSecurity(options, jsonObject, mockOptions);
|
|
272
274
|
}
|
|
273
275
|
}, {
|
|
274
276
|
key: "postJSONAllowHTML",
|
package/package.json
CHANGED
|
@@ -114,24 +114,25 @@ class HttpService {
|
|
|
114
114
|
rpcMethodName = "";
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
delete ajaxOptions.rpcMethodName;
|
|
124
|
-
}
|
|
117
|
+
// if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
118
|
+
//
|
|
119
|
+
// }
|
|
120
|
+
if (jsonObject) {
|
|
121
|
+
ajaxOptions.data = jsonObject;
|
|
122
|
+
}
|
|
125
123
|
|
|
126
|
-
|
|
127
|
-
ajaxOptions.
|
|
124
|
+
if (ajaxOptions.rpcMethodName) {
|
|
125
|
+
delete ajaxOptions.rpcMethodName;
|
|
126
|
+
}
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
128
|
+
ajaxOptions.type = "post";
|
|
129
|
+
ajaxOptions.dataType = "json";
|
|
132
130
|
|
|
133
|
-
|
|
131
|
+
if (!ajaxOptions.url) {
|
|
132
|
+
ajaxOptions.url = this.requestContextPath + rpcMethodName;
|
|
134
133
|
}
|
|
134
|
+
|
|
135
|
+
return $.ajax(ajaxOptions);
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
__postForMock(mockOptions) {
|
|
@@ -250,9 +251,11 @@ class HttpService {
|
|
|
250
251
|
jsonObject = ajaxOptions.data;
|
|
251
252
|
}
|
|
252
253
|
|
|
253
|
-
if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
254
|
-
|
|
255
|
-
}
|
|
254
|
+
// if (!this.__checkJSONObjectSecurity(jsonObject)) {
|
|
255
|
+
//
|
|
256
|
+
// }
|
|
257
|
+
|
|
258
|
+
return this.postJSONWithNotCareSecurity(options, jsonObject, mockOptions);
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
postJSONAllowHTML(options, jsonObject, mockOptions) {
|