Hi All,
Okay i found out solution by myself, the following code can able to get actual link.
Idea is you need parse from response where is location.
@function httpGet(theUrl)
{
var locationUrl;
var http = new XMLHttpRequest()
http.open ("GET", theUrl, true); // async
http.send (null);
http.onreadystatechange = function() // Call a function when the state changes.
{
if (http.readyState == 4)
{
if (http.status == 200)
{
locationURL = http.getResponseHeader("location")
//console.log("headers: " + locationUrl + " locationUrl: " + locationUrl)
} else
{
console.log("error: " + http.status)
}
}
}
return locationUrl;
}@