【问题标题】:Request Payload data in Sencha Touch在 Sencha Touch 中请求 Payload 数据
【发布时间】:2012-07-24 01:36:21
【问题描述】:

刚刚尝试在 Sencha Touch 中同步模型,发现它还不支持发送嵌套模型数据。所以我不得不手动执行 Ajax 请求。

如何通过“请求有效负载”而不是参数等发送数据?

Ext.Ajax.request({
        url: '/api/blah',
        method: 'POST',
        params: {
            request: toAdd,
        },
        success: function(response, opts) {

        },
        failure: function(response, opts) {

        }
    });

我猜它必须是我发送的特定标头?

谢谢,多米尼克

【问题讨论】:

    标签: javascript xmlhttprequest sencha-touch sencha-touch-2


    【解决方案1】:
    Ext.Ajax.request({
        url: '/api/blah',
        method: 'POST',
        jsonData: {
            //the object data etc,
        },
        success: function(response, opts) {
    
        },
        failure: function(response, opts) {
    
        }
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-29
      • 2012-06-25
      • 1970-01-01
      相关资源
      最近更新 更多