A sample of how to build a rest client using Angular JS