Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Barcelona
    Posts
    6
    Vote Rating
    0
    zeopix is on a distinguished road

      0  

    Default Custom headers not working. Ext.Ajax.request()

    Custom headers not working. Ext.Ajax.request()


    REQUIRED INFORMATION
    Ext version tested:
    • Sencha Touch 2.0.0
    Browser versions tested against:
    • Chrome 10.0.963
    DOCTYPE tested against:
    • html
    Description:
    • I use Ext.Ajax.request to make a content request, in wich one i want to customize sent headers, so i use "headers" config to send my own info, but the request sent to the server has no trace about this custom headers.
    Steps to reproduce the problem:
    • Create new function and make a new ajax request, configure headers: { 'X-INFO':'info' }, no matter what uri.
    • Control this function with some listener (button tap)
    • Build&launch in browser, open Webkit Inspector (or similar) and analyze network, then call the control listener (tap the button or whatelse), and grab the adequate request, then take care on request headers.
    The result that was expected:
    • Was expected to found "X-INFO: info" inside the plain request petition.
    The result that occurs instead:
    • Just normal request headers, no custom info was found.
    Test Case:

    Ext.Ajax.request({
    url: 'http://mywebservice/api/',
    headers: { 'x-wsse' : this.getWsseHeader() },
    success : function(response){
    console.log(response);
    }
    })

    Operating System:
    • OSX
    http://i44.tinypic.com/25i6gyr.png
    25i6gyr.jpg
    Last edited by zeopix; 27 Mar 2012 at 3:03 PM. Reason: typo

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    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


    I do see the x-wsse in Chrome under Access-Control-Request-Headers using your example. Do you have any other details that may help reproduce the issue?

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Location
    Barcelona
    Posts
    6
    Vote Rating
    0
    zeopix is on a distinguished road

      0  

    Default


    I have been following the trace of the headers object, i reached setupHeaders() method in Ext.data.Connection class, then i printed out headers value in console, x-wsse value was there, but then when i see request headers in Chrome it doesn't appears, i don't know what's happening, I will keep trying...

    Thanks.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Location
    Barcelona
    Posts
    6
    Vote Rating
    0
    zeopix is on a distinguished road

      0  

    Default


    Solved, i can see the headers now, the mistake was on because of bad modifications that i've made to ext.data.connection source.
    Thanks

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..."