@osimatic/helpers-js 1.0.109 → 1.0.110
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/http_client.js +4 -4
- package/package.json +1 -1
package/http_client.js
CHANGED
|
@@ -176,7 +176,7 @@ class HTTPClient {
|
|
|
176
176
|
static async request(method, url, data, successCallback, errorCallback, formErrorCallback) {
|
|
177
177
|
method = method.toUpperCase();
|
|
178
178
|
|
|
179
|
-
if ('
|
|
179
|
+
if ('GET' === method) {
|
|
180
180
|
url += (!url.includes('?') ? '?' : '') + HTTPClient.formatQueryString(data);
|
|
181
181
|
data = null;
|
|
182
182
|
}
|
|
@@ -193,7 +193,7 @@ class HTTPClient {
|
|
|
193
193
|
cache: 'no-cache'
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
if ('
|
|
196
|
+
if ('GET' !== method) {
|
|
197
197
|
requestOptions['body'] = HTTPClient.formatFormData(data);
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -244,7 +244,7 @@ class HTTPClient {
|
|
|
244
244
|
static async download(method, url, data, errorCallback, completeCallback) {
|
|
245
245
|
method = typeof method == 'undefined' || null == method ? 'GET' : method;
|
|
246
246
|
|
|
247
|
-
if ('
|
|
247
|
+
if ('GET' === method) {
|
|
248
248
|
url += (!url.includes('?') ? '?' : '') + HTTPClient.formatQueryString(data);
|
|
249
249
|
data = null;
|
|
250
250
|
}
|
|
@@ -260,7 +260,7 @@ class HTTPClient {
|
|
|
260
260
|
cache: 'no-cache'
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
if ('
|
|
263
|
+
if ('GET' !== method) {
|
|
264
264
|
requestOptions['body'] = HTTPClient.formatFormData(data);
|
|
265
265
|
}
|
|
266
266
|
|