dimanche 18 janvier 2015

Sencha Touch 2.4 on iPad - Ext.Ajax.Request - response getting changed

Hi,

Sencha Touch 2.4.0

Cordova: 3.6

iOS: 7 and iPad Air


In our application - there is an option to sync the application - The sync will refresh the application.

we are using 'document.location.reload()'


Some time the web service response is getting changed. Assume there are 3 different web service is called every time refresh.


For example,

First web service - returns 4 record and second web service - returns 3 and 3rd web service also returns 3 records.


But some time 2 requests getting the same response(i.e first and 3'rd web service). Which I could see by printing the toalRecordCount and request url is different.



Code:



Ext.Ajax.request({
url: url,
method: "GET",
headers: getBearerAuthHeader(),
write: 'json',
limitParam: false,
pageParam: false,
disableCaching:false,
enablePagingParam: false,
success: function(response) {
var responseObj = JSON.parse(response.responseText);
log('The total record: ' + responseObj.totalRecordCount);
log('Request URL: ' + response.request.options.url);
},
failure: function(response) {
}
);

Unable to understand why two web services are getting same response? Please suggest me how to resolve this issue?



Sencha Touch 2.4 on iPad - Ext.Ajax.Request - response getting changed

Aucun commentaire:

Enregistrer un commentaire