1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default Unanswered: Add header to form submit

    Unanswered: Add header to form submit


    Hi,

    I have Ext.form.Panel that submits request to server. I need to add custom header to request.
    How I can do it?

    10x

    Here is my code
    Code:
    var form = Ext.create('Ext.form.Panel', {
                        frame: true,
                        url:'/diamond/rest/api/V2/experiences/'+expId+'/attachments/files/'+file.getId()+'/data',
                        standardSubmit:true,
                        items: [
                            {
                                xtype: 'textfield',
                                name: 'downloadUrl',
                                value:file.data.contentResource
                            },
                            {
                                xtype: 'textfield',
                                name: 'mimeType',
                                value: file.data.mimeType
                            },
                            {
                                xtype: 'textfield',
                                name:  'fileName',
                                value:  file.data.fileName
                            },
                            {
                                xtype: 'textfield',
                                name: 'cookie',
                                value:_document.cookie
                            }
                        ]
                    });
    
    
                   
                    form.submit({
                        success: function(form, action) {
                            Ext.getBody().unmask();
                            Ext.Msg.alert('Success', action.result.message);
                        },
                        failure: function(form, action) {
                            Ext.getBody().unmask();
                            Ext.Msg.alert('Failed', action.result ? action.result.message : 'No response');
                        }
                    });

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Answers
    124
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default


    I don't use Ajax since I want to download image data and display it after response.
    So till now I used form.submit and the result was loaded into separated iframe, now I want to add header to HTTP request and I can't find how to do it.
    Do you know how to do it differently (using Ajax call?) with possibility to add headers?

    10x

Thread Participants: 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