代码 1
$.ajax({url:"1.aspx/HelloWorld",type:"GET",dataType:"json",contentType:"application/json"});
代码 2
$.ajaxSetup({
contentType: "application/json",
dataType: "json"
});
$.get("1.aspx/HelloWorld","",$.noop,"json");
Code1 有效地设置了content-type
并且Code2datatype
没有设置内容类型这是有意的还是我必须做 Voodoo 的东西来使它工作?