jeudi 13 novembre 2014

proxy ajax POST request

trying to get some data from a POST request

the call from the emulator results in a Bad Request status 400. In looking at the call itself see that it is sending page=1&start=0&limit=25 in the body. How can these params be eliminated and the data/json payload sent?


code:


{

xtype : 'dataview' ,

height : 392,

width : 312,

flex : 4,

docked : 'bottom' ,

layout : {

type : 'fit'
},

itemTpl : '<div><table><tr><td>{claimNumber}</td><td>{insuredName}</td></tr><tr><td>{deliveryDate}</td><td> {status}</td></tr></table></div>' ,

store : {

autoLoad : true ,

fields : ['claimUUID' , 'claimNumber' , 'insuredName' , 'deliveryDate' , 'status' ],

proxy :{

noCache : false ,

pageParam : false ,

actionMethods :{create : 'POST' , read : 'POST' , update : 'POST' , destroy : 'POST' },

type :'ajax' ,

url :'http://<system dns>:8080/myservice/service/v1.0/mock/list' ,

extraParams :{

email :'jane@wiser.com' ,

name : 'Jane Wiser' ,

phone : '(781)-292-0000'
},

headers : {

'Content-Type' : 'application/json' , 'Accept' : 'application/json'
},

reader : {

type : 'json'
}

}

}






proxy ajax POST request

Aucun commentaire:

Enregistrer un commentaire