try this one, it will be helpful
function makeHTTPCall(url)
{
console.log("Making HTTP call: ", url);
setTimeout(processResponse, 3000);
}
function processResponse()
{
console.log("response received...");
console.log("Processing response...");
}
makeHTTPCall('//write the URL here');