I am trying to use jQuery ajax to send a json object to a specified url using POST method.
But when I run the code the firebug shows the error as Error 501 method POST not supported
Here is my code
$.ajax({
type: "POST",
url: '/data/' + name + ".json",
contentType: 'text/json',
data: {"name": "XYZ",
"city": "ABC"
},
dataType: 'json',
success: function (msg) {
alert("sucessful");
}
});
I also tried “PUT” method but no luck.
Any idea or alternate option for this???
So you need to need to reconfigure it (if it can handle
POST) or choose another server