【发布时间】:2013-11-13 11:25:28
【问题描述】:
我正在调用身份验证服务,我在其中执行 $http.post,它返回 303 响应,重定向到返回响应的 get 调用。
当我使用 Postman 进行 post 调用时,我得到了所需的响应,但是当我进行有角度的 $http.post 调用时,它返回一个 401 错误(这是用户未授权)
我在进行角度调用时是否遗漏了什么?后端服务似乎运行良好,因为它在 Postman 上运行良好。
这就是 $http 调用的样子:
$http.post(url, userData).success(function(data, status) {
//handle success
}.error(function(data, status) {
//handle error
});
在这种情况下,url 和用户数据构造得非常好。
【问题讨论】:
标签: angularjs http-status-code-303