hi am new to Sencha touch2, am facing problem while fetching data from a remote url. When i use the url in simple rest client am able get data and with status: 200 ok. Here is input of simple rest client for your reference.
---------------
url: http://190.40.2.14:9030/work
Method: post
Headers:Accept: application/json
Data:<workTO><platform>ALL</platform></workTO>
---------------
how can i use post request, headers and data how can i do this in Sencha touch2.
here is the model with proxy:
Ext.define('TestApp.model.myModel', {
extend: 'Ext.data.Model',
xtype:'modelList',
config: {
fields:['work'],
proxy:{
type:'rest',
// url:'http://localhost:9090/TestApp/app/store/sample.json',// this works
url:'http://10.30.2.141:9030/work',
reader:
{
type:'json'
}
}
}
});