extjssencha-architectsencha-touch-2.3

How do you set HTTP header value for an Ext.data.Store's REST proxy in Sencha Touch 2.3?


I've got this code in a button tap event:

var skustore = Ext.getStore('productsstore');

skustore.getProxy.setHeaders({'Session-Token': sess});

Prior to this I've set a value for sess.

I keep getting the error msg "Uncaught typeError: undefined is not a function".

How may I achieve my objective? Variable sess is set based on the response from a server so the value cannot be hard-coded.

Thanks


Solution

  • Might be just a typo, but getProxy is no property of the store. Use getProxy() instead.