【发布时间】:2015-09-09 07:57:19
【问题描述】:
这是我的 angularjs 请求,每当我提交请求时,它都会返回错误并且没有延迟。
var req = $http({
method: 'POST',
url: 'https://localhost:44300/authentication/login',
data: { UserID: Username, Password: Password },
dataType: "json"
});
req.success(
function (result) {
alert('success');
});
req.error(function (result) {
alert('something went wrong');
});
提前致谢。
【问题讨论】:
-
是
404错误吗?那么是的,应该是,因为您指向localhost,如果您设置https,它应该可以正常工作 -
web api 设置在同一台机器上,我使用的是什么我已经尝试了 http 本地 url 及其工作,但是当我使用 SSL 时它会抛出一个错误'[]'
标签: angularjs ssl https iis-express visual-studio-cordova