我有以下 jQuery 代码:
$.ajax({
url: Url,
dataType: 'JSONP',
type: 'POST',
success: function (data, textStatus, jqXHR) {
//callback function here
},
error: function (xhr, ajaxOptions, thrownError) {
//report error
}
});
但是,当我在Fiddler中查看此 AJAX 请求时,我的请求已从 a 转换POST
为 a GET
。
我正在连接的 API 不允许这样做,因为它必须是POST
请求。
为什么会这样?