[jQuery] clueTip send header with Ajax request
Hi all. I am implementing clueTip and have it working just fine using
an Ajax call. However, when all is said and done, the Ajax call will
be hitting a web service that requires a custom authentication header.
I have set up my jQuery global ajax options to send the header on all
requests.
jQuery.ajaxSetup({
beforeSend: function(xhr)
{ xhr.setRequestHeader("customAuthHeader",
"customAuthHeaderValue");}
});
However, it does not appear that clueTip recognizes these global
options (ideally, it probably should). So, I have to send the header
on the request manually. I have tried to do this via the ajaxSettings,
but I am getting syntax errors and the clueTip docs don't mention
anything about using beforeSend, so I am not even sure if it is
possible.
ajaxSettings: {
dataType: 'xml',
beforeSend: function(xhr) {
xhr.setRequestHeader("customAuthHeader",
"customAuthHeaderValue")
}
},
Has anyone done this or can anyone provide some advice on how to do
this?