PDA

View Full Version : adding http headers to jsonp proxy?



jeremym
24 Feb 2012, 9:22 AM
The documentation for Ext.data.proxy.Ajax shows a "headers" ... but the Ext.data.proxy.Jsonp class does not (neither do its parent classes). I tried adding headers to the proxy the way one might to an ajax proxy (in-line in the store via "headers: {...}", also in the controller before calling load via store.proxy.headers=... and via Ext.apply similarly) , and I tried setting the default Ajax headers to include the header I'm trying to add... but in no cases is the header showing up (its an authorization header and I was still getting prompted for user/pass on load so I debugged using httpfox and found the header missing)... Is there a trick to adding a header to a jsonp proxy?

Thanks!

jeremym
24 Feb 2012, 10:00 AM
Looked around online and found that this may not be possible due to the way jsonp works... this page: http://stackoverflow.com/questions/3350778/modify-http-headers-for-a-jsonp-request is about doing the same thing in jquery...