AngularJS (500 Internal Server Error) for http put
AngularJS (500 Internal Server Error) for http put
我想将记录更新到 api。
在我的萤火虫中,它显示:
500内部服务器错误,
XML 分析错误:未找到元素 位置:
moz-nullprincipal:{f514f16e-f3d3-49f1-99e6-105b2b80f26c}
第 1 行第 1 列:
并且还显示:
没有子对象
这是我的代码
$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 }
});
这是用这个解决
的$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
});
执行 PUT 请求的快捷方法是:$http.put(url, data, [config]);@user3055606您的答案是否正确。
相关文章:
- Meteor如何接收HTTP请求
- 为什么JavaScript在for循环为3时向所有4发出警报
- 另一个ajax调用中的Jquery ajax调用在for循环中没有按预期工作
- Is onfling available for html, html5
- Setting default onclick behavior for <img> tag in gene
- 我的javascript for循环不起作用
- node.js:在for循环中进行http调用
- AngularJS (500 Internal Server Error) for http put
- 如何使用 javascript for http request 使用 .com url.
- JavaScript for HTTP post XML with authentication
- Angular-For Loop HTTP回调/承诺
- Javascript variables for Get http
- HTTP/2: stream.end using For-Loop
- Curl to $http.post() for Angular JS
- Angular js not waiting for $http ?
- Meteor / Node.js:多个http请求在一个for循环中,均匀地跨越一个定时间隔
- `while`或`for`循环使用$http.get
- 在嵌套的for循环中调用HTTP
- 在javascript的for循环中维护http请求的顺序
- 在for循环中进行同步HTTP调用