1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    bino is on a distinguished road

      0  

    Default Answered: Ext.Ajax.setUseDefaultXhrHeader() has no method what gives?

    Answered: Ext.Ajax.setUseDefaultXhrHeader() has no method what gives?


    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);



  2. Set the config useDefaultXhrHeader on your request

    Example

    Code:
            Ext.Ajax.request({
                url : '/news',
                method : 'POST',
                useDefaultXhrHeader : false,
                scope : this,
                success : this.onNewsSuccess,
                failure : this.onNewsFailure
            });

  3. #2
    Sencha Premium Member
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    34
    Answers
    10
    Vote Rating
    8
    Johnny Major will become famous soon enough

      0  

    Default


    Set the config useDefaultXhrHeader on your request

    Example

    Code:
            Ext.Ajax.request({
                url : '/news',
                method : 'POST',
                useDefaultXhrHeader : false,
                scope : this,
                success : this.onNewsSuccess,
                failure : this.onNewsFailure
            });

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    bino is on a distinguished road

      0  

    Default


    Thanks Johnny Major

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi