Get Data From Ajax Request To Angular
I have 2 requests $.ajax({ type: 'POST', url: 'http://sandbox.gasvisor.com:9988/uaa/oauth/token', data: 'grant_type=client_credentials', headers: { 'Content-Type':
Solution 1:
Here is a simple example for one of your call:
$http({
method: 'POST',
url: 'http://sandbox.gasvisor.com:9988/uaa/oauth/token',
data: 'grant_type=client_credentials',
headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization':'Basic SVRXRV9XRUJfQVBQOml0d2VfY2xpZW50' },
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
$scope.response = response;
}, function errorCallback(err) {
// called asynchronously if an error occurs
// or server returns response with an error status.
$scope.error = err;
});
Post a Comment for "Get Data From Ajax Request To Angular"