1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    60
    Vote Rating
    0
    chulochula is on a distinguished road

      0  

    Default How to set method and params for AjaxProxy in Architect 2.x?

    How to set method and params for AjaxProxy in Architect 2.x?


    By code I can write Ext.Ajax.request with method set to POST and params set to anything.

    How could I do it in a Store's AjaxProxy inside Architect 2.x please?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    If you always want to send the same params with each load you can set the extraParams configuration of your AjaxProxy.

    A far more typical environment though is that you want to conditionally send different params.

    Code:
    store.load({
        params: {
            foo: '123'
        }
    });
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    60
    Vote Rating
    0
    chulochula is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    If you always want to send the same params with each load you can set the extraParams configuration of your AjaxProxy.

    A far more typical environment though is that you want to conditionally send different params.

    Code:
    store.load({
        params: {
            foo: '123'
        }
    });
    Thanks! I will try it when I back office

    However, how to set the method to POST? WIll store.load({mehtod: 'POST'}) do?