关于浏览器Ajax请求Type为Request Payload而不是Form Data

排查了许久。最后得出来是JqGrid插件的问题

没办法,底层不能改

在你Ajax请求中加上

headers : {
    'Content-Type' : 'application/x-www-form-urlencoded'
},

示例:

$.ajax({
    type : "POST",
    url : "../user/repwd",
    headers : {
      'Content-Type' : 'application/x-www-form-urlencoded'
    },
    data : data,
    dataType : "json",
});

解决

posted @ 2017-12-20 17:08  試毅-思伟  阅读(299)  评论(0编辑  收藏  举报