weixin_33709219 2015-08-07 16:54 采纳率: 0%
浏览 25

AJAX通话无回应

I am not getting any response from my AJAX call to the API. Few days back it was working fine and I was getting response JSON but now I am not able to get any JSON object. Mozilla does not give response JSON but shows no error but in Chrome I am getting net::ERR_INSECURE_RESPONSE

AngularJS code:

app.controller("LoginCtrl",
        function($scope, $http,$location,$rootScope) {
    $scope.login = function(user){
        $http({
            method: "POST",
            url: "https://aadvq11nwbv01.staples.com/wcs/resources/v1/member/login?storeId=10101&responseFormat=json",
            /*header: "Access-Control-Allow-Origin:*",*/
            header: "Content-Type: application/json",
            header: "Accept: application/json",
            data:{
                companyID: $scope.user.customerid,
                userID: $scope.user.userid,
                password: $scope.user.password
            }
        })
        .success(function (response){
            $rootScope.profile="xxx";
            userDetails = response;
            console.log(userDetails);
            $location.url("/profile")
        })
        .error(function (err){
            $scope.logerr="err";
            console.log(err);
        });
    }
});
  • 写回答

2条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 Qt Vs2017使用Charts异常
      • ¥15 将位图选入内存DC失败,但没有出错信息
      • ¥20 如何从 .html url 启动/激活 .py 文件(sql debug)
      • ¥15 c#调用soap出错,soapui中可以
      • ¥100 CBIS-DDSM kaggle 资料处理
      • ¥30 python 在 excel 用 OpenPyXL 怎么实现以下代码
      • ¥15 pywinauto 无法捕获到元素
      • ¥15 ARfoundation (可能由于没打开摄像头的)黑屏问题
      • ¥15 pycharm打包项目包含mp3文件,运行exe程序后mp3文件没有执行。
      • ¥15 Quantlib求discount factors