PDA

View Full Version : send request payload on store load



rishisaraf11
9 Mar 2014, 11:47 PM
Hello All,

I want to load store using post request which need request body in form of json something like below. I tried params but it is not sending data in correct way. Can someone let me know how can I send a json data during store load.

[{
"id":1,
"name": "deploymentProfile",
"value":"sample"
}]

Zinnia
10 Mar 2014, 1:28 AM
Use the below code,it is working fine at my end.

store.load( { params : {
id:1,
name: "deploymentProfile",
value:"sample"
},
scope : this,
callback : function(records, operation, success) {
}
});

skirtle
10 Mar 2014, 2:07 PM
See the part on jsonData here:

http://skirtlesden.com/articles/custom-proxies