我正在尝试在 sencha 中调用注册 webservive。当我在浏览器上调用它时,它似乎没问题。但是我在应用程序中调用它会给出以下错误。请任何人帮助我。
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
这是我的代码
Ext.Viewport.setMasked({xtype:'loadmask',message:'your custom loadmask'});
Ext.data.JsonP.request({
url: 'http://XXX.XXX.com/api/users/?',
params: {
first_name:'mohit',
last_name:'bisht' ,
city:'ramnagar',
state:'UK',
phone:'9073467465',
email:'test@test.com',
password_digest:'123456',
op:'s'
},
success : function(response,opts) {
Ext.Viewport.setMasked(false);
console.log(response.status);
},
failure : function(response,opts) {
Ext.Viewport.setMasked(false);
if (response.timedout) {
Ext.Msg.alert('error', 'Request to server timed out.');
}
else if (response.aborted) {
Ext.Msg.alert('error', 'Request Aborted by server.');
}
else {
Ext.Msg.alert('error', 'Invalid Request to server.');
}
}
});