Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!