RestAngular vs $http on calls that aren't strictly RESTful?

72 views Asked by At

Is there any point in using RestAngular if most of my calls don't end up being the usual RESTful GET all, GET by id, PUT, POST, DELETE, etc?

I understand the beauty of it for RESTful, but am I wrong in not seeing the advantage when I end up having other methods in my controllers? (E.g. returning a Dto of multiple joined tables).

Obviously the fact that you don't have to type out the full url is still there, but that's addressed by a "baseUrl" constant when using $http.

1

There are 1 answers

0
Brandon Brooks On

There is some benefit in that you can inject pre and post processors for requests, but for the most part, I find your assumption correct that there is little benefit when dealing with not strictly restful endpoints.

I would also recommend that $http requests reside in services and not in your controllers.