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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -