AngularJS: Call GET and POST from API