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

213
Visualizações
POST <APIURL> net::ERR_NAME_NOT_RESOLVED

I'm trying to create a simple web application form. It requires the user to input their information, and click submit which ideally would hit an api and store the information somewhere like dynamodb.

I have this code

      $.ajax({
        type: 'POST',
        url: 'myAPI',
        contentType: 'application/json',
        data: data,
        success: function(res) {
          $('#form-response').html('<div class="mt-3 alert alert-success" role="alert"><p>Congratulations! You should receive an email with your personalized invitation soon!.</p></div>');
          $('#yobutton').prop('hidden', true);
          $('#yobutton').text('Preferences saved!');
        },
        error: function(jqxhr, status, exception) {
          $('#form-response').html('<div class="mt-3 alert alert-danger" role="alert">An error occurred. Please try again later.</div>');
          $('#yobutton').prop('disabled', false);
        }
      });

which is returning a response error POST net::ERR_NAME_NOT_RESOLVED

For the life of me, I can't figure out what's wrong here... It references the jquery.min.js file on this line: s.send(t.hasContent && t.data || null)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is a name resolution issue, nothing wrong with your code.

Basically, your computer must "convert" the name of your website to an IP Address it can send packets to.

Name resolution == Hostname -> IP.

This process can be done in multiple ways. Hosts file, local name resolution protocols like llmnr or nbns, and, most famously and probably most relevant, DNS.

If the host that hosts the API doesn't have a DNS record, As a temporary workaround:

You can add your record to your hosts file

Or maybe input the ip address directly, although that might interfere with HTTP reverse proxies and such.(or theoretically it might change at some point)

If a dns record for it does exist, there's probably a typo in your 'myAPI'.

Try running in cmd

nslookup example.com

And then the same but replace the example.com with your hostname. (without the / and everything that follows!)

about 4 years ago · Juan Pablo Isaza Relatório
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