@osimatic/helpers-js 1.1.48 → 1.1.49

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.
Files changed (2) hide show
  1. package/http_client.js +2 -2
  2. package/package.json +1 -1
package/http_client.js CHANGED
@@ -204,7 +204,7 @@ class HTTPClient {
204
204
 
205
205
  let headers = HTTPClient.getHeaders(false, additionalHeaders);
206
206
 
207
- if ('PATCH' === method) {
207
+ if ('PATCH' === method || 'DELETE' === method) {
208
208
  headers.append('Content-Type', 'application/x-www-form-urlencoded');
209
209
  // 30/01/2023 : ajout encodeURIComponent() sinon les valeurs contenant des "+" pose pb (signe "+" retiré)
210
210
  body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
@@ -292,7 +292,7 @@ class HTTPClient {
292
292
  method = method.toUpperCase();
293
293
 
294
294
  let headers = HTTPClient.getHeaders(false, additionalHeaders);
295
- if ('PATCH' === method) {
295
+ if ('PATCH' === method || 'DELETE' === method) {
296
296
  headers.append('Content-Type', 'application/x-www-form-urlencoded');
297
297
  body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
298
298
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.48",
3
+ "version": "1.1.49",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"