尽管使用Curl,Angular和jQuery,我的ExtJS存储AJAX或Rest调用仍无法正常工作

时间:2014-02-20 18:51:44

标签: rest extjs

这是我的商店:

Ext.define('testApp.store.Users', {
extend: 'Ext.data.Store',
model: 'testApp.model.User',
proxy: {
    type: 'ajax',
    url: 'http://jsonstub.com/blogPost',
    headers: {
        'JsonStub-User-Key': '[redacted]',
        'JsonStub-Project-Key': '[redacted]'
    },
    afterRequest: function(req, res) {
        console.log("Ahoy!", req.operation.response);    
    }
},

});

当我的应用程序运行时,我得到一个:

Failed to load resource: the server responded with a status of 404 (Not Found) http://jsonstub.com/blogPost?_dc=1392922205820&page=1&start=0&limit=25

我认为这是我的身份验证,但如果输入错误的标头值,我会收到403错误,而不是404错误。

0 个答案:

没有答案