1. #11
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,507
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Looks good. And what's in the request that is logged? You do know what the green colour means?

  2. #12
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,507
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      1  

    Default


    I miscopied the header. You need

    Code:
    Ext.lib.Ajax.useDefaultXhrHeader = false;

  3. #13
    Ext JS Premium Member
    Join Date
    Dec 2008
    Posts
    61
    Vote Rating
    0
    jeroenooms is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    I miscopied the header. You need
    Code:
    Ext.lib.Ajax.useDefaultXhrHeader = false;
    Now it works for normal Ajax request, but not when I add custom headers. Let me give a full example, so you can try it out (assuming you have a gmail/google account somewhere):

    Visit this url to request a temporary security token: AuthSubRequest. The site will ask for permission. If you grant permission, you will be fowarded to Extjs.com?token=sometokenhere. This token is a temporary token that you can exchange for a session token using this request:
    Code:
    Ext.Ajax.request({
    	url:"https://www.google.com/accounts/AuthSubSessionToken", 
    	method: "GET",
    	headers:{'authorization':'AuthSub token="temp_token_here_between_the_quotes"'},
    	success: function(xhr){alert(xhr.responseText)}
    });
    The response for this request should contain a new token, that you can use to access google services. Note that it is important that the authorization header should be exactly in the form AuthSub token="asdf8sdjksdu8ds8g", and you can use every temp token only once.

  4. #14
    Sencha User
    Join Date
    Jan 2012
    Posts
    48
    Vote Rating
    0
    $p00ky is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    I miscopied the header. You need

    Code:
    Ext.lib.Ajax.useDefaultXhrHeader = false;
    Hi,

    I have the same problem with ExtJs 4.1.1a, the store.load() creates an OPTIONS request instead of a GET in Firefox (works fine in IE/Chrome though, sending a GET).
    How can I tell ExtJS to send a proper GET and not OPTIONS in Firefox?

    Thanks,

    $p00ky

  5. #15
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    64
    Vote Rating
    4
    team.avesta is on a distinguished road

      0  

    Default


    Any one got Solution to this problem..?? I am also getting 405 error.....
    .
    In an Ajax call instead of GET, the browser is running OPTION method..
    .
    .
    Any help appreciated.
    Thanks

  6. #16
    Sencha User
    Join Date
    Apr 2011
    Posts
    7
    Vote Rating
    0
    mannuk is on a distinguished road

      0  

    Default


    i have the same issue. how can we solve it?