Results 1 to 4 of 4

Thread: how to set timeout in api actions for a HttpProxy

  1. #1
    Sencha User
    Join Date
    Jul 2010
    Posts
    304

    Default how to set timeout in api actions for a HttpProxy

    Hi,
    I try to set a timeout parameter on read/create/update/delete actions of the HttpProxy api parameter this way :

    Code:
            var remoteGridProxy = new Ext.data.HttpProxy({
                api:{
                    read: { url: '../secure/getSubjectDataGrid.htm', method: 'GET', timeout: 240000 },
                    create: { url: '../secure/createSubjectDataGrid.htm', method: 'POST', timeout: 240000 },
                    update: { url: '../secure/updateSubjectDataGrid.htm', method: 'POST', timeout: 240000 },
                    destroy: { url: '../secure/deleteSubjectDataGrid.htm', method: 'POST', timeout: 240000 }
                }
            });
    But it doesn't work
    According to the documentation they say that
    Alternatively, one can use the object-form to specify each API-action
    I wonder what is "object-form". Anyway I am sure that we can specify "url" and "method" and
    I checked that in each EXTJS object that has "method" parameter we can specify timeout parameter

    Thank you in advance for your answers

  2. #2
    Sencha User
    Join Date
    Jul 2010
    Posts
    304

    Default

    I haven't found a solution, I relaunch the thread

  3. #3
    Sencha User D@nte's Avatar
    Join Date
    Jan 2011
    Location
    Havana, Cuba
    Posts
    14

    Default

    This one may be a solution

    Code:
           var remoteGridProxy = new Ext.data.HttpProxy({
                api:{
                    read: { url: '../secure/getSubjectDataGrid.htm', method: 'GET'},
                    create: { url: '../secure/createSubjectDataGrid.htm', method: 'POST'},
                    update: { url: '../secure/updateSubjectDataGrid.htm', method: 'POST'},
                    destroy: { url: '../secure/deleteSubjectDataGrid.htm', method: 'POST'}
                }
            });
    
    
    
    
    
                remoteGridProxy.getConnection().timeout = 240000;

  4. #4
    Sencha User
    Join Date
    Jul 2010
    Posts
    304

    Default

    Hi [email protected], and thank you for your answer
    actually it works

Similar Threads

  1. Add timeout to Provider Actions
    By ckr in forum Ext.Direct
    Replies: 13
    Last Post: 15 Jan 2011, 12:06 AM
  2. HttpProxy adjustable timeout ?
    By kalebwalton in forum Ext 1.x: Help & Discussion
    Replies: 11
    Last Post: 13 Jun 2009, 3:50 PM
  3. ID's for Actions?
    By stefan.lotties in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 19 May 2009, 11:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •