possibility to set withCredential on webix.ajax

Hello,

That is nice if you library webix.ajax support this parameter.

Currently my workaround is to have this code to add this parameter.
webix.ajax.prototype.withCredential = function (bool) {
this._withCredential = bool;
return this;
};
webix.ajax.prototype.getXHR = function () {
if (this._withCredential) {
var request = new XMLHttpRequest();
request.withCredentials = true;
return request;
}
return new XMLHttpRequest();
};

Regards,

Eric.

There’s an onBeforeAjax event (but note that it applies globally), that allows to set withCredentials to true and modify headers if needed.

Please check the related docs:
http://docs.webix.com/desktop__server_customload.html#modifyingbackgroundajaxrequests

Thanks

Hello,

Finally a solution specific to a connection is better but for my case I can also use your solution because I can know the URL and specify this parameter depending of the URL value.

Regards,

Eric