$scope.result = ""; $http({ method: 'POST', url: 'http://localhost:8000/api/v1/user/user_signin', data: { username: $scope.user.username, password: $scope.user.password }, responseType:'json' }).then(function successCallback(response) { console.log('success'); $scope.result = response; console.log($scope.result); }, function errorCallback(response) { console.log('error'); console.log(response); }); 

Result in the console:

 Object {data: null, status: 200, config: Object, statusText: ""} 

What am I doing wrong? Why data:null ? In postman, the server returns this: {"response_code":200,"salt":"76d2772eaf0a1ef2bed8fc423ca98af87c664b5b"}

I need access to the salt variable.

Network: enter image description here

enter image description here

  • one
    Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin

0