@osimatic/helpers-js 1.1.5 → 1.1.6
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/date_time.js +1 -1
- package/http_client.js +3 -2
- package/package.json +1 -1
package/date_time.js
CHANGED
|
@@ -39,7 +39,7 @@ class DateTimeFormatter {
|
|
|
39
39
|
static getTimeSqlFormatter(timeZone) {
|
|
40
40
|
this.timeSqlFormatter = this.timeSqlFormatter || {};
|
|
41
41
|
if (typeof this.timeSqlFormatter[timeZone] == 'undefined') {
|
|
42
|
-
console.log('init getTimeSqlFormatter avec timezone', timeZone);
|
|
42
|
+
//console.log('init getTimeSqlFormatter avec timezone', timeZone);
|
|
43
43
|
this.timeSqlFormatter[timeZone] = new Intl.DateTimeFormat('en-GB', { hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, timeZone: timeZone }); //hour12: false = 24h format
|
|
44
44
|
}
|
|
45
45
|
|
package/http_client.js
CHANGED
|
@@ -187,7 +187,8 @@ class HTTPClient {
|
|
|
187
187
|
let headers = HTTPClient.getHeaders();
|
|
188
188
|
if ('PATCH' === method) {
|
|
189
189
|
headers.append('Content-Type', 'application/x-www-form-urlencoded');
|
|
190
|
-
|
|
190
|
+
// 30/01/2023 : ajout encodeURIComponent() sinon les valeurs contenant des "+" pose pb (signe "+" retiré)
|
|
191
|
+
body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
|
|
191
192
|
}
|
|
192
193
|
else if ('POST' === method) {
|
|
193
194
|
body = HTTPClient.formatFormData(data);
|
|
@@ -268,7 +269,7 @@ class HTTPClient {
|
|
|
268
269
|
let headers = HTTPClient.getHeaders();
|
|
269
270
|
if ('PATCH' === method) {
|
|
270
271
|
headers.append('Content-Type', 'application/x-www-form-urlencoded');
|
|
271
|
-
body = new URLSearchParams(HTTPClient.formatFormData(data)).toString();
|
|
272
|
+
body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
|
|
272
273
|
}
|
|
273
274
|
else if ('POST' === method) {
|
|
274
275
|
body = HTTPClient.formatFormData(data);
|