PDA

View Full Version : How to define defaultHeaders in data.Connection?



royi
20 Sep 2007, 8:45 AM
Hi,

I would like to define the charset in a data.Connection object.
Any examples?

Thanks,
Roy

Animal
20 Sep 2007, 12:01 PM
http://www.w3.org/TR/XMLHttpRequest/#dfn-send

See point 4. The standard says that an XHR uses UTF-8.

maya
21 Sep 2007, 12:19 AM
Hi Animal,

Is this the right syntax? (it doesn't seem to influence on the outcome).


proxy: new Ext.data.HttpProxy({
url: '$url',
defaultHeaders: {'Content-Type': 'text/plain;charset=windows-1255'}
})


Thanks,
Maya