ajax done doesnt fire when receive json file. it prints json object out client side
$.ajax({
type: "POST",
url: url,
processData: false,
dataType: 'json',
contentType: 'application/json',
data: data
}).done(function() {
console.log( "Sample of data:");
alert("hello");
}).fail(function() {
console.log("ajax failed ");
});
on service side, I got json file from client
def post(self):
print self.request.body
print tornado.escape.json_encode(self.request.body)
self.set_header("Content-Type", "application/json")
self.write("{}")
on browser , I didnt see any error code. i get 200. but console output "ajax failed" please help