PDA

View Full Version : XmlStore headers and xml data



michal.warecki
6 Jun 2010, 8:04 AM
Hi,

I have a problem with sending http headers and xml to server side using XmlStore.
Is it possible to send headers using "load" method ? How can I set xml message insead of simple http property ( key=value&key2=value2 ) ?

My xml store looks like this :



var store = new Ext.data.XmlStore({
// load using HTTP
url: '/user/list.xml',
record : 'user',
idPath : 'id',
totalProperty : '@total',
// the return will be XML, so lets set up a reader
fields : [
{name : 'firstName'},
{name : 'secondNames'},
{name : 'identifier'},
{name : 'username'}
]
}
});


And I want to send headers similar to Ajax.request :


headers: {
'Accept': 'application/xml',
'Content-Type' : 'application/xml'
}


And Xml message like this :


xmlData: '<message>test</message>'