@osimatic/helpers-js 1.1.47 → 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.
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/jwt.js CHANGED
@@ -136,10 +136,6 @@ class JwtSession {
136
136
  return JwtToken.getData(JwtSession.getToken(), key);
137
137
  }
138
138
 
139
- static setData(key, value) {
140
- localStorage.setItem(key, value);
141
- }
142
-
143
139
  static isAnonymous() {
144
140
  return localStorage.getItem('access_token') == null;
145
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"