The service works when i am not sending any data or if i am sending data as url params. When i am trying to send data as post params the response status code is 405 (method not allowed). Below is the AngularJS service method that i am using.
this.editAuthUser = function (url) {
var data = { email: 'abc@xyz.com', username: 'test'};
return $http({
url: url,
method: 'POST',
headers: { 'Content-Type':'application/json; charset=utf-8'},
data: data
});
};
I am sharing the image of the headers as displayed in developer tools.