How to access the XmlHttpRequest object in JSF ajax's addOnEvent callback? -


i want add header every ajax request sent every form of every page in jsf application. in jquery can use this:

$(document).ajaxsend(function(ev, xhr, opt) {     xhr.setrequestheader('custom-header', random-value); }); 

but how can similar in jsf 2.2?

jsf.ajax.addonevent(function(data) {     // how access xmlhttprequest object? }); 


Comments