When data is fetched from a DataSource class as defined below...
The request that is done, is something like:
/customers?offset=0&limit=38&isc_dataFormat=json
Is it possible to get the isc_dataFormat parameter removed?
Code:
isc.defineClass('CustomersDataSource', isc.RestDataSource);
CustomersDataSource.addProperties({
dataFormat: 'json',
dataURL: '/customers',
operationBindings: [
{ operationType: 'fetch', dataProtocol: 'getParams' },
{ operationType: 'add', dataProtocol: 'postParams' },
{ operationType: 'update', dataProtocol: 'postParams', requestProperties: { httpMethod: 'PUT' } },
{ operationType: 'remove', dataProtocol: 'postParams', requestProperties: { httpMethod: 'DELETE' } }
],
sendMetaData: false,
transformRequest: function (request) {
if (request.operationType === 'fetch') {
request.params = isc.addProperties({}, request.params, {
offset: request.startRow,
limit: request.endRow - request.startRow
});
} else {
request.params = isc.addProperties({}, request.params, {
authenticity_token: Backend.getProperties().authenticity_token
});
}
return this.Super('transformRequest', arguments);
}
});
/customers?offset=0&limit=38&isc_dataFormat=json
Is it possible to get the isc_dataFormat parameter removed?
Comment