Webix custom header for all ajax requests

As we already know, webix can use ajax request individually as well as in many components like file manager apis.

There are few questions regarding custom headers in different type of ajax requests.

Q1) When loading data/create/update/delete in file manager through API. How do we add header in those requests to server?

Q2) How can i add default custom headers for all the ajax requests used in webix?

How can i add default custom headers for all the ajax requests used in webix?

You can use “onBeforeAjax” event, to intercept any ajax call and set a custom header

http://docs.webix.com/desktop__server_customload.html#modifyingbackgroundajaxrequests

When loading data/create/update/delete in file manager through API. How do we add header in those requests to server?

You can define your own function, which will be called instead of an URL, and from such custom function, do any kind of custom ajax call, with all necessary headers.