What’s the best way to put some common logic once connected to ajax response headers as normally done in a interceptor?
Hello,
To change request headers of all the requests sent with webix.ajax()
, you can modify the parameters of Webix global onBeforeAjax event.
To get response header for requests sent with webix.ajax()
, you can provide callbacks to the needed calls:
webix.ajax().get(url, params, function(text, data, xhr){ .. });
where xhr
is an XMLHttpRequest object from which you can access the headers.