开发者

getting data from HTTP put

Note: This question is specific to Grails and jQuery

I'm making an ajax call to my server using PUT:

$.ajax({
    url: "admin/services/instance",
    type: "PUT",
    data: {instance: dataAsJSON},
    dataType: "json",
    async: false,
    success: function(){},
    error: function(){}
});

So this call works fine, it 开发者_如何学编程calls my controller, but when print params.instance, it's null.

But when i do this as a "POST" it works fine.

Does anyone have any thoughts?


According to the jQuery manual: "Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers."

Does your browser support PUT?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜