问题
Was just trying to sync a model in Sencha Touch and realised that it doesn't yet support sending of Nested Model data. So I'm having to do the Ajax request manually.
How can I send the data via 'Request Payload' instead of parameters etc?
Ext.Ajax.request({
url: '/api/blah',
method: 'POST',
params: {
request: toAdd,
},
success: function(response, opts) {
},
failure: function(response, opts) {
}
});
I'm guessing it has to be a particular header I send across?
Thanks, Dominic
回答1:
Ext.Ajax.request({
url: '/api/blah',
method: 'POST',
jsonData: {
//the object data etc,
},
success: function(response, opts) {
},
failure: function(response, opts) {
}
});
来源:https://stackoverflow.com/questions/11610684/request-payload-data-in-sencha-touch