Results 1 to 2 of 2

Thread: Ajax.request Request URL Problem

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default Answered: Ajax.request Request URL Problem

    Dear ST-Users

    I have a problem using an Ajax requuest using a dynamically url...


    The URL should look like this:
    http://servername:8002/sap/bol2rest/ComponentSets

    If I look at the query bevore the ajax request is called it looks exactly how it should!
    But when I use the JS Tools in Chrome it looks looks like this:
    http://servername:8002/sap/bol2rest/...=1349082374938

    How to avoid this?




    Code:
    loader: function(uri) {
            var query = 'http://servername:8002' + uri;
            var store = Ext.getStore('MyStore');
    
           Ext.Ajax.request({
                url: query,
                useDefaultXhrHeader: false,
                method: 'GET',
                success : function(result) {
                    var jsreq = Ext.JSON.decode(result.responseText);
                    store.setData(jsreq.itab);
                },
                failure: function(response, opts) {
                    console.log('server-side failure with status code ' + response.status);
                }
            });
        }

    Kind regards
    Fabian Diehl

  2. The extra string is added to prevent usage of the cached response by the browser. You can change it by setting the disableCaching config to false.
    http://docs.sencha.com/touch/2-0/#!/...disableCaching

  3. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    The Netherlands
    Posts
    75
    Answers
    13
    Vote Rating
    4
      1  

    Default

    The extra string is added to prevent usage of the cached response by the browser. You can change it by setting the disableCaching config to false.
    http://docs.sencha.com/touch/2-0/#!/...disableCaching

Tags for this Thread

Posting Permissions

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