Take a look at our service's REST client:
self.headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
};
self.loginClient = $resource(self.baseUrl + '/users/login', {
userId: '@userId',
password: '@password'
}, {
save: {
method: 'POST',
headers: self.headers
}
});
When using it, I do the following -
AuthService.loginClient.save({
userId: self.user.email,
password: self.user.password
}).$promise.then(function (res) {
// perform actions
})
The resulting URL path that the browser accesses is structured like this:
/users/login?password=XXXXXX&rememberMe=false&userId=XXXXXX
I'm wondering if there is an issue causing my POST parameters to be URL encoded. Any insights on what might be wrong here would be greatly appreciated! Please let me know if more information is needed.