I'm having an issue getting this jQuery.ajax call to work. When the script executes I get an error (textStatus = "error"), but no error message (errorThrown = "").
$.ajax({
type: 'GET',
url: 'http://www.kanbanpad.com/api/v1/projects.json',
username: '[email protected]',
password: 'myAPIkey',
dataType: 'json',
success: function(data) {
alert(data);
},
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus+': '+errorThrown);
}
});
If I manually hit the API URL (above) and type in my login credentials, I do get the proper JSON response. So, I'm not sure what I'm doing wrong. Is my code malformed?
If you need more information about the API, go to http://www.kanbanpad.com/api/v1
{"readyState":0,"responseText":"","status":0,"statusText":"error"}- therealklannijsonpdataType, I get{"readyState":4,"status":200,"statusText":"parsererror"}as the jqXHR object anderrorThrown=jQuery15108416848906781524_1299986108143 was not calledwhich is odd, since according to jQuery documentationerror: function(){should never be called when dataType isjsonp. - therealklanni