I'm using the following jQuery code to try and access the delicious api, but it's not working. If I go directly to the api url in the browser it returns the xml as expected, so the url is correct.
Anyone got any ideas what's up? Could be that it's https, but teh jQuery documentation doesn't explicitly forbid this.
$(document).ready(function(){
$.ajax({
type: 'GET',
dataType: 'xml',
url:"https://api.del.icio.us/v1/posts/dates",
success: function(response) {
console.log(response);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
console.log(errorThrown);
}
});
});
edit:
I get a "data is null" error, which still happens if I set data: '', and on first attempt to access the page in the browser I'm prompted for username and password, which seems to be stored as if I include a tag with href="https://api.del.icio.us/v1/posts/dates" in the head it downloads the file ok