Hi,
I am new to Sencha Touch I am trying to set the value for useDefaultXhrHeader to false with Ext.Ajax.setUserDefaultHxrHeader(false); but I always get this error from the console
Uncaught TypeError: Object [object Object] has no method 'setUseDefaultXhrHeader'
Is there anything I am missing?
Here's my code snippet
Code:
(function() {
var Parse;
window.Parse = Parse = (function() {
function Parse(applicationId, masterKey) {
this.applicationId = applicationId;
this.masterKey = masterKey;
this.endpoint = 'https://api.parse.com/1/classes/';
}
Parse.prototype.create = function(args) {
Ext.Ajax.setUseDefaultXhrHeader();
return Ext.Ajax.request({
url: this.endpoint + args.className,
method: 'POST',
jsonData: args.object,
success: (function(result) {
return args.success(JSON.parse(result.responseText));
}),
error: args.error,
headers: {
Authorization: "Basic " + (Base64.encode(this.applicationId + ":" + this.masterKey))
}
});
};
return Parse;
})();
}).call(this);