I seem to be having trouble getting the basic auth to work in a jquery/json call to the api. I am pretty sure the format is correct and I have included a Base64 encoder script in the header and it is working properly. Here is what I have -
$.ajax({
'url' : '
http://api.polleverywhere.com/multipl...',
'dataType' : 'json',
'beforeSend': function(xhr) {
xhr.setRequestHeader('Authorization', 'Basic ' + Base64.encode('user:pass'));
},
'success' : function(json) {
alert('workie');
},
'error' : function(xhr,err) {
alert('no workie');
}
});