I need to set the authorization request header to httpXMLRequest. In the grid definition, I tried to set through ajaxGridOptions, as shown below:
ajaxGridOptions: { Authorization: 'Basic YWRtaW5AZGVmYXVsdC5jb206YWRTwa6=' }
and use the beforeSend event as shown below:
beforeSend: function(jqXHR, settings) { jqXHR.setRequestHeader("Authorization", 'Basic YWRtaW5AZGVmYXVsdC5jb206YWRTwa6='); }
None of this works for me. What is the correct syntax?
Thanks!!
xueru source share