As requested in https://github.com/crowbar/crowbar-ui/pull/58/files#diff-1decdd3c74bc130e7faf34856d182a54 a way to reuse code has been requested.
To update default values in $http service would work, but I'd like to avoid touching the global one in case we need to reuse it to consume a different set of APIs in the future (OpenStack, for instance)
Restangular seems to have an official recommendation to solve it: https://github.com/mgonto/restangular#how-to-create-a-restangular-service-with-a-different-configuration-from-the-global-one
As requested in https://github.com/crowbar/crowbar-ui/pull/58/files#diff-1decdd3c74bc130e7faf34856d182a54 a way to reuse code has been requested.
To update default values in $http service would work, but I'd like to avoid touching the global one in case we need to reuse it to consume a different set of APIs in the future (OpenStack, for instance)
Restangular seems to have an official recommendation to solve it: https://github.com/mgonto/restangular#how-to-create-a-restangular-service-with-a-different-configuration-from-the-global-one