Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2625 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    budoudoh is on a distinguished road

      0  

    Default useDefaultXhrHeader option not working for Ext.Ajax.request calls

    useDefaultXhrHeader option not working for Ext.Ajax.request calls


    It does not appear that the useDefaultXhrHeader option is working for Ext.Ajax.request calls. I looked at the current source for this function in Sencha Touch 2 (http://docs.sencha.com/touch/2-0/sou...method-request) and there does not appear to be any explicit reference to this parameter, even though it is referenced in the Ajax tutorial for making CORS calls (http://docs.sencha.com/touch/2-0/#!/guide/ajax). I looked at the Source for this same function in Sencha Touch 1.1 and there is explicit mention of the parameter:

    if (me.useDefaultXhrHeader && !headers['X-Requested-With']) { headers['X-Requested-With'] = me.defaultXhrHeader; }

    I am trying to make a CORS request to a server that I do not have control over, and this server does not accept the 'X-Requested-With' header parameter, so I would like to remove it from the request. Thanks guys.

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    budoudoh is on a distinguished road

      0  

    Default


    I just determined that if I call the setter function for this parameter, it works.

    So using Ext.Ajax.setUseDefaultXhrHeader() works to set the parameter to true or false. However, it still does not work as it was described in the tutorial.

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    We'll get that fixed in the documentation. Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    Hi budoudoh,

    I've updated the request method to also support the useDefaultXhrHeader option being passed in. Also added documentation for the setter and getter methods on Ext.Ajax itself.

    Thanks for the report.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    The Ajax proxy now also has this configuration to allow Ajax proxies to request data cross domain.

  6. #6
    Sencha Premium Member sandeshdshetty's Avatar
    Join Date
    Nov 2011
    Location
    Bangalore India
    Posts
    9
    Vote Rating
    0
    sandeshdshetty is on a distinguished road

      0  

    Default Does this feature available in ST 2.1?

    Does this feature available in ST 2.1?


    Does this feature available in ST 2.1?

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar