Jon*_*wak 7 iphone http-headers cors angularjs
我正在使用Phonegap和AngularJS,CORS_REST开发Android和IOS的移动应用程序.我几乎掌握了Android上标题的所有功能.在使用GapDebug在iPhone上进行测试时.
以下是身份验证代码的示例:
$http.post('someurlhere', {username: username, password: password})
.then(function (response) {
if(!response.IsAuthenticated) {
alertsManager.addAlert('Username or password is incorrect', 'alert-danger');
}
callback(response);
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
我得到一个错误:
如果有人能请求帮助我会非常感激.
谢谢:
小智 17
请检查标题参数,iOS9不接受http标题中的值,这些参数在值的开头有空格.例:
"令牌":"Token12345"=>错误的
"令牌":"令牌12345"=>正确
我希望这可以帮助你.
| 归档时间: |
|
| 查看次数: |
2634 次 |
| 最近记录: |