I call create to do an api query for cluster components.
api.post(path, data, angular.extend({
transformRequest: [ pruneClusterComponent, prependClusterComponent ],
transformResponse: [ extractClusterComponent ],
initializer: configureClusterComponent,
pathfinder: pathfinder
}, config)
I now have a clusterComponent. I call $reload
on that cluster component.
clusterComponent.$reload();
In epixa-resource
here: https://github.com/epixa/epixa-resource/blob/master/src/resource.js#L120, the config it's trying to use is same config as it uses for the POST request:
{
transformRequest: [ pruneClusterComponent, prependClusterComponent ],
transformResponse: [ extractClusterComponent ],
initializer: configureClusterComponent,
pathfinder: pathfinder
}
This is a problem because it's trying to do a GET now ... so the same request transforms don't really apply. In this case, the pruneClusterComponent
request transform actually bombs out, since there's no body apply the function to.