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

176
Views
¿Cómo obtener JSON correctamente después de la llamada AJAX?

Pasé mucho tiempo en esta tarea e investigué horas, pero todavía no tengo una solución para esto.

me sale un error 401

Pero si agrego esto al final de la url: ?jsonpcallback=?

Obtengo esto en la consola: Uncaught SyntaxError: token inesperado:

Alguien me puede orientar en esto por favor y decirme que estoy haciendo mal. ¡Gracias de antemano!

Aquí está mi código:

 $.ajax({ type: "GET", url: "XXX/jsonpcallback=?", dataType: 'jsonp', crossDomain:true, success: function (data){ console.log(data); }, error: function (err) { console.log(err) } });
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Prueba esto.

 $.getJSON('XXX/jsonpcallback=?xxx', function(data) { console.log(data); });
about 4 years ago · Santiago Trujillo 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!