Error: SyntaxError: DOM Exception 12 setRequestHeader@[native code]
Error: SyntaxError: DOM Exception 12 setRequestHeader@[native code]
我正在使用 Phonegap 和 AngularJS、CORS_REST 为 Android 和 IOS 开发移动应用程序。 Android 上 headers 的所有工作我都准备好了。使用 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);
});
我遇到了一个错误:
SyntaxError: DOM Exception 12_IMG
如果有人能帮忙,我将不胜感激。
谢谢:
请检查您的 headers 参数,iOS9 不接受值开头为 space 的 http headers 中的参数。示例:
"Token":"Token12345" => 错误
"Token":"Token12345" => 正确
希望对您有所帮助。
我正在使用 Phonegap 和 AngularJS、CORS_REST 为 Android 和 IOS 开发移动应用程序。 Android 上 headers 的所有工作我都准备好了。使用 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);
});
我遇到了一个错误:
SyntaxError: DOM Exception 12_IMG
如果有人能帮忙,我将不胜感激。
谢谢:
请检查您的 headers 参数,iOS9 不接受值开头为 space 的 http headers 中的参数。示例:
"Token":"Token12345" => 错误
"Token":"Token12345" => 正确
希望对您有所帮助。