How to implement a PUT call with JSON data using AJAX and JQuery?

后端 未结 3 1785
情书的邮戳
情书的邮戳 2021-02-07 08:31

I\'ve looked around and tried many different methods, but can\'t seem to pass actual data to my controller\'s function.

Here is some code:

        var UR         


        
3条回答
  •  囚心锁ツ
    2021-02-07 09:18

    The dataType attribute is only used when you're getting data from the server. You should be setting contentType to application/json when sending data to the server.

提交回复
热议问题