REST: Experiment accessing REST API using $resource