PDA

View Full Version : How to set response header within EXTJS 4



ramesh_jal
20 Aug 2015, 9:18 AM
I am making use of Ext.data.Store in my code and in turn along with results i need to set response headers as per my requirement. Following are response headers willing to set. Can you please let me know how to set this response headers?

'Content-Type'
'Cache-Control'
'Pragma'
'Expires'

joel.watson
29 Aug 2015, 9:30 AM
Hi--

If you're wanting to add request headers, you can do this by specifying them in the "headers" config of your store's proxy:

http://docs.sencha.com/extjs/4.2.4/#!/api/Ext.data.proxy.Ajax

If you need to set response headers, you'll need to do this in your server-side code.

I hope that helps--thanks!
Joel