Set Headers in Webix Send

Hello,
It’s possible to add headers in webix send features? i want to add “csrf token” in my “webix send”

I have done to add on

webix.attachEvent(“onBeforeAjax”, function(mode, url, data, request, headers, files, promise){
headers[“X-CSRF-TOKEN”]= $(‘meta[name=“csrf_token”]’).attr(‘content’);
});

It’s work perfectly with ajax post request, but not work in webix send

Thank You

Hello, @vickypaulantono

The thing is that Webix Send works bypassing Webix Ajax.
By default, parameters of POST and GET requests are formatted equally.
If the parameters are passed as an object, the common logic assembles them in one string (complex values will be serialized) and applies encodeURIComponent to each value as a default safety/formatting action.
At the same time, the pre-created FormData will pass without changes (used in Webix Send). That is the cause of the difficulties with adding headers.
Could you, please, explain, the reason you want to use Webix Send particularly?