【发布时间】:2014-02-07 09:46:17
【问题描述】:
在 Java script 中,当我们发送 GET 请求时,它不添加任何参数,但在 EXT-JS 中它会自动添加 CallBack 参数。 (我检查了 Wireshark 和 firebug)
我们能够在瞻博网络 MFC URL 上的浏览器上看到 xml,因为它发送 GET 请求,但是当 REQUEST 使用任何参数(如“回调参数”(acc到 Firebug、浏览器和 wireshark)。
所以我需要在修改后的加载函数中从 ScriptTagProxy, 创建一个新的代理扩展。 请告诉我该怎么做。
我做了以下但没有运气。
var _Proxy = Ext.extend(Ext.data.MyScriptTagProxy({
url: 'http://IP:PORT/App',
method: 'GET',
nocache: false,
restful: true
});
Ext.define('Ext.data.MyScriptTagProxy' {
extend: 'Ext.data.ScriptTagProxy',
constructor:function(cnfg){
this.callParent(arguments);//Calling the parent class constructor
this.initConfig(cnfg);//Initializing the component
this.on('beforerender',this.beforeRender);
}});
如果主题有其他解决方案也请提出建议。
【问题讨论】:
-
为什么必须是 ScripTagProxy?
-
HI themel,我需要向另一个域发送请求......所以我可以在那里只发送 GET 请求,没有任何参数。
标签: extjs callback request script-tag