Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

212
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda