samedi 29 novembre 2014

Why this Ajax request returns as an error?


Vote count:

0




Here's my problem : I make an ajax request to a Wordpress PHP function. Strange thing is : this request is returned as an error.


But in the error log, the responseText is the requested data (json as a string), the status is 200 and statusText is "OK".


Here's the request :



$.ajax({
type: "GET",
dataType: "json",
url: ajaxurl,
data: { action:'tweets_to_posts_api_call',username: settings.username, list: settings.list, hashtag: settings.hashtag, count: settings.count, exclude_replies: settings.hideReplies, lastID:settings.lastID }
}).done(function( twt ) {

}).error(function(err) { console.log(err); }); // err.responseText = the requested data ...


So : if all is ok, why this request is detected as if an error occurred ?



asked 51 secs ago







Why this Ajax request returns as an error?

Aucun commentaire:

Enregistrer un commentaire