The following code triggers a GET instead of a POST HTTP request.
function AddToDatabase() { this.url = \'./api/add\'; } AddToDatabase.prototype.postData
For me, your piece of code look OK, but if you want to be sure, you can use $.post instead of $.ajax
$.post('ajax/test.html', function(data) { $('.result').html(data); });
jquery link : http://api.jquery.com/jQuery.post/