ps-toolkit-ui 1.16.97 → 1.16.98
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/bundles/ps-toolkit-ui.umd.js +12 -22
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/request.class.js +12 -22
- package/fesm2015/ps-toolkit-ui.js +12 -22
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -2108,28 +2108,18 @@
|
|
|
2108
2108
|
RequestClass.prototype.getClient = function (url, method, data, done, fail) {
|
|
2109
2109
|
var _this = this;
|
|
2110
2110
|
var token = HelperClass.getCookie('Authorization');
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
// TODO const formData = this.jsonToFormData(data);
|
|
2124
|
-
settings = {
|
|
2125
|
-
url: this.environment.apiUrl + url,
|
|
2126
|
-
method: exports.Method[method].toString(),
|
|
2127
|
-
dataType: 'json',
|
|
2128
|
-
contentType: 'application/json; charset=utf-8',
|
|
2129
|
-
data: data !== null && data !== {} ? JSON.stringify(data, null, 2) : null,
|
|
2130
|
-
headers: token == null ? {} : { Authorization: token, Accept: 'application/json' }
|
|
2131
|
-
};
|
|
2132
|
-
}
|
|
2111
|
+
if (!(data instanceof FormData)) {
|
|
2112
|
+
console.log(data);
|
|
2113
|
+
data = this.jsonToFormData(data);
|
|
2114
|
+
}
|
|
2115
|
+
var settings = {
|
|
2116
|
+
url: this.environment.apiUrl + url,
|
|
2117
|
+
method: exports.Method[method].toString(),
|
|
2118
|
+
processData: false,
|
|
2119
|
+
contentType: false,
|
|
2120
|
+
data: data,
|
|
2121
|
+
headers: token == null ? {} : { Authorization: token }
|
|
2122
|
+
};
|
|
2133
2123
|
var request = $$1.ajax(settings);
|
|
2134
2124
|
request.done(function (response) {
|
|
2135
2125
|
if (!_this.environment.production) {
|