I am trying to send POST request which contains url param, url query params and body.
My resource looks like this:
return $resource(myService.getResourceUrl('/users/:username/password'), {}, {
resetPassword: {
method: 'POST',
params: {passwordResetToken: '@passwordResetToken'}
}
});
Resource is used in service:
resetPassword: function(username, password, config){
return ru.handleErrors(passwordManagerResource.save({username: username}, password, config).$promise);
}
And finally service is called in the main controller:
var config = {passwordResetToken: '39af3539-12f8-4285-8a96-526a25c0fa00'};
var password = {password: 'Aaaaaaaa01'};
userManagementService.resetPassword("test_user", password, config).then(function(res){
console.log("helllloooo_again");
}
However query parameters are not added to the url. Generated URL has following structure: