Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
jquery get on a https url callback not being called - fails silently

Please see below simple code block that makes a basic jQuery get call

<!doctype html>

<html>

<head>
    <meta charset="utf-8">
    <title>Get test</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"> 
    </script>
    <script>
        // register callback on windows.load
        $( window ).on( "load", loaderfunc );
        // loaderfunc definition
        function loaderfunc (jQuery)
        {
            alert("calling get now");
            $.get('https:/myrestfulservice-get-endpoint.mydomain.net',
                function (data){
                    alert("in callback from get");
                }
                .fail(function (jqXHR,settings,ex) { 
                    alert('failed, '+ ex); 
                })
                .done(function(data) {
                    alert("json retrieve success");
                })
            )
        }

</script>

</head>

<body>
    <h1> TEST PAGE FOR GET REQUEST </h1>
</body>
</html>

In this I see alert "calling get" on page load. However thereafter I don't see any alert either for success or for failure I did verify that my service at provided url returns a valid http response - that happens to be a json string ( "https:/myrestfulservice-get-endpoint.mydomain.net" this service name is fudged )

I am open to using getJSON - however that too fails silently What am I missing

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda