Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Extended proxy to resolve Android 3+ url param bug
/**
* Android 3+ doesn't like url params
* for file:// ajax request, so let's remove them!
*/
Ext.define('MyApp.proxy.NoParamAjax', {
extend: 'Ext.data.proxy.Ajax',
alias: 'proxy.noparamajax',
/**
* Set config to remove auto params
*/
config: {
noCache: false,
enablePagingParams: false,
},
/**
* Copied from Ext.data.proxy.Ajax, modified to remove params
*/
doRequest: function(operation, callback, scope) {
var writer = this.getWriter(),
request = this.buildRequest(operation);
request.setConfig({
headers : this.getHeaders(),
timeout : this.getTimeout(),
method : this.getMethod(request),
callback : this.createRequestCallback(request, operation, callback, scope),
scope : this
});
if (operation.getWithCredentials() || this.getWithCredentials()) {
request.setWithCredentials(true);
}
request = writer.write(request);
var requestCfg = request.getCurrentConfig();
// remove all url params for Android 3+ compatibility
requestCfg.params = {};
Ext.Ajax.request(requestCfg);
return request;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.