1. #1
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Red face Adding HTTP Headers to Direct Requests

    Adding HTTP Headers to Direct Requests


    Anyone know if it's possible to add HTTP headers to a Direct Request? I know it can be done to AJAX requests but after flipping through the source I couldn't find how it can be done for Direct requests. Any suggestions?

    Thanks,
    Dan

  2. #2
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Default


    Figured it out. Once again the Ext team made it so easy that I completely overlooked it.

    Since Ext.Ajax is a singleton and Direct relies on Ext.Ajax, HTTP headers can be added directly to Ext.Ajax either by the defaultHeaders param:

    Code:
    Ext.Ajax.defaultHeaders = {
        'Powered-By': 'Ext'
    };
    Or during the firing of an event like 'beforerequest', etc.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Location
    Georgia, Tbilisi
    Posts
    4
    Vote Rating
    0
    arboshiki is on a distinguished road

      0  

    Default Adding Headers to direct Requests

    Adding Headers to direct Requests


    Hello everyone, I have been searching for 4 days already how to add headers to Ext.direct method requests. I tried what is written in this thread but I could not see desired header in developer tools network tab. Here is my Ext js code.
    Code:
     Ext.Ajax.defaultHeaders = {        		"Access-Control-Allow-Origin": "*",
            		"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE"
            };
            userController.getSomething(function(a){
    			Ext.ComponentQuery.query('panel')[6].setHtml('<span style="font-size: 28px">'+a+'</span>');
            });
    can you help me? Thank you.

Thread Participants: 1

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