//use 'GET'
{
xtype : 'jsonstore',
url : 'list.php'
}
//use 'POST'
{
xtype : 'jsonstore',
url : 'getArticle.php',
params : {user_id : 1}
}
In case we want to always use one method without worrying about parameters, we have to specify the proxy:
//always use 'POST'
{
xtype : 'jsonstore',
proxy : new Ext.data.HttpProxy({url:'list.php', method:'POST'})
}
To use 'GET' only, just change the method to 'GET'.
No comments:
Post a Comment