I am trying to put some JSON formatted data via Ajax with jQuery to a server. My code looks like this:
$.ajax({
type: "PUT",
url: myURL,
contentType: "application/json",
data: {"data": "mydata"}
});
But on the server-side, I receive a data=mydata
string, instead of the expected JSON. Firebug tells me the same.
Where is the error?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…