92,7 → 92,7 |
return chaine.replace(/[^a-z0-9_\s]/gi, '').replace(/[_\s]/g, '_'); |
} |
|
WidgetPhotoCommun.prototype.envoyerVersService = function ( mode, url, donnees = null, callback = () => {}) { |
WidgetPhotoCommun.prototype.envoyerVersService = function ( mode, url, token = null, donnees = null, callback = () => {}) { |
const lthis = this; |
|
var xhr = new XMLHttpRequest(); |
99,6 → 99,10 |
xhr.open(mode, url, true); |
xhr.setRequestHeader("Content-Type", "application/json"); |
|
if(token){ |
xhr.setRequestHeader("Authorization", token); |
} |
|
xhr.onreadystatechange = function () { |
if (xhr.readyState === 4) { |
if (xhr.status >= 200 && xhr.status < 300) { |