【发布时间】:2016-06-15 08:48:51
【问题描述】:
我有一个奇怪的情况,我正在使用 jQuery load() 将一些内容加载到模式中。这在开发中完美运行,但在生产服务器上,该对象被忽略并且只发送一个 GET 请求。我检查了成功的typeof 对象,并尝试了加载方法的第二个参数中的其他变体。以前从未有过。
var $modal = $('#ajax-modal');
$('body').modalmanager('loading');
//_token = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
setTimeout(function(){
var _post = {ajax:true, lead:lead, type:type };
$modal.load('leads/action/', _post, function(){
});
}, 1000);
标题:
Request URL:http://mydomain/leads/action
Request Method:GET
Status Code:200 OK
我还在 Chrome 中收到 Provisional headers are shown。
脚本应该 POST 到 url 并将数据加载到模式中。以下是我在本地服务器上发送的标头:
ajax:true
lead:4273
type:reminder
任何指针将不胜感激
【问题讨论】:
-
到底是什么问题?您需要 POST 请求还是 GET 请求?
-
您在使用 Web API 吗? @jhodgson4
-
可能是查询字符串超出限制的问题? @jhodgson4
标签: javascript jquery