我正在尝试使用POST请求调用API.但我的Chrome Inspector会method='GET'在网络标签中显示我...
这是我的代码:
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'
}
});
Run Code Online (Sandbox Code Playgroud)
所以O想用API method='POST'和参数调用APIoperation = showall
Google Inspector会在网络标签中向我显示以下信息:
GET ../path_to/api/?_dc=1315297478131&page=1&start=0&limit=25 HTTP/1.1
Run Code Online (Sandbox Code Playgroud)
为什么是GET请求?
为什么有限制,启动和直流等参数?
我已经尝试了1000个教程并用Google搜索了一整夜.