I have two different URLs for serving POST and GET methods.
- This URL uses the POST method and requires a request body with no parameters.
- It utilizes the GET method with input provided through parameters.
In my services.js file, I am using the following code for the POST call:
.factory('User', ['$resource',function($resource){
return $resource('http://205.147.99.162:8080/UASAPI/UserServices');
}])
To make a POST call, I use the following code snippet which works as expected:
User.save(angular.toJson(userAndAttributesValues), function(res){},function(res){});
Now, how can I add the GET method URL inside the User factory to be able to use the get() and query() methods from ngResource?
How should I go about invoking it?