Reputation: 65
I want to update the record to the api.
In my firebug it shows:
500 internal server error,
XML Parsing Error: no element found Location:
moz-nullprincipal:{f514f16e-f3d3-49f1-99e6-105b2b80f26c}
Line Number 1, Column 1:
and also under put it shows:
There are no child objects
Here is my code
$scope.EditUser = function(){
$scope.ApplicationId = '7bg67898ewnbqjq65e';
$http.put("mydomain.com/api/Users/UpdateUser", {}, {
params: { _id: $scope.selectedItem._id, ApplicationId: $scope.ApplicationId, User_Name : $scope.selectedItem.UserName, IsActive: $scope.selectedItem.IsActive }
});
Upvotes: 0
Views: 2537
Reputation: 1533
The shortcut method to perform PUT request is: $http.put(url, data, [config]); @user3055606 your Answer is correct.
Upvotes: 1
Reputation: 65
This is solved using this
$scope.EditUser = function(){
$scope.ApplicationId = '7bg67898ewnbqjq65e';
$http.put("mydomain.com/api/Users/UpdateUser", {
_id: $scope.selectedItem._id, ApplicationId: $scope.ApplicationId, User_Name : $scope.selectedItem.UserName, IsActive: $scope.selectedItem.IsActive
});
Upvotes: 1