HttpResponseMessage值未在$ http post方法中获取

时间:2018-12-10 06:56:34

标签: api http model-view-controller

我使用了两个应用程序和通用的mvc控制器API。我已经从application1触发了API,API也被触发,并且该值也从API返回,但是值未在post方法成功函数中获取。如何解决呢? 代码:

$http({
          //  contentType: 'application/json; charset=utf-8',
            method: "POST",              
            url: $rootScope.apiUrl + '/api/account/authenticate',
            data: user,
            headers: {
                'Content-Type': 'application/json;charset=utf-8',
                'data-Type':'json'
            },
            success: function (response) {
                callback(response);
            },
            error: function (response) {
                callback(response);
            }

        });

0 个答案:

没有答案