$.ajax({ type: ‘GET’, timeout: 10000, async: false, url: urlEnvio, }).then(function(response){ retorno = response; }, function(response){ retorno = response; }); return retorno; }