I am new to jQuery and API. I want to store $.ajax
response into a variable but I am getting an output as [object object]
instead of token string.
My code is below:
var result=$.ajax({
"async": true,
"crossDomain": true,
"url": "https://.........../api/v1/sdk_initialize",
"method": "GET",
"headers": {
"Content-Type": "application/json",
"cache-control": "no-cache",
"Authorization": "Basic .........=",
},
success: function(response) {
return response;
}
});
alert(result);