How to get authenticated Json object in angularjs -
i want object using request in angularjs. server asks authentication details: how pass authentication details?
$http({ method: 'get', url: 'http://192.168.1.133:8080/xyz-api/api/customer/token/xyzname', headers: { 'content-type': 'application/json' } }).success(function (data) { $scope.customerdetails = data; $scope.customer_id = $scope.customerdetails.id; $scope.companyname = $scope.customerdetails.name; }).error(function () { alert('error'); });
Comments
Post a Comment