m00l
6 Sep 2011, 12:43 AM
I'm trying to call a API with a POST request. But my Chrome Inspector shows me method='GET' in the network tab...
Here's my code:
Ext.define('TestItem',{
extend:'Ext.data.Model',
fields:[
{name:'id', type:'int'},
{name:'name', type:'string'}
]
});
var testStore =Ext.create('Ext.data.JsonStore',{
model:'TestItem',
autoLoad:true,
proxy:{
type:'ajax',
url :'../path_to/api/',
method :'POST',
reader:{
type:'json',
root:'data',
totalProperty:'total'
}
},
baseParams:{
operation:'showall'
}
});
So O want to call the API with
method='POST' and the parameter
operation = showall
The Google Inspector shows me in the network tab the following information:
GET ../path_to/api/?_dc=1315297478131&page=1&start=0&limit=25 HTTP/1.1
Why is it a GET request?
Why are there some parameters like limit, start and dc?
I already tried 1000 tutorials and googled the whole night.
Here's my code:
Ext.define('TestItem',{
extend:'Ext.data.Model',
fields:[
{name:'id', type:'int'},
{name:'name', type:'string'}
]
});
var testStore =Ext.create('Ext.data.JsonStore',{
model:'TestItem',
autoLoad:true,
proxy:{
type:'ajax',
url :'../path_to/api/',
method :'POST',
reader:{
type:'json',
root:'data',
totalProperty:'total'
}
},
baseParams:{
operation:'showall'
}
});
So O want to call the API with
method='POST' and the parameter
operation = showall
The Google Inspector shows me in the network tab the following information:
GET ../path_to/api/?_dc=1315297478131&page=1&start=0&limit=25 HTTP/1.1
Why is it a GET request?
Why are there some parameters like limit, start and dc?
I already tried 1000 tutorials and googled the whole night.