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

236
Views
La solicitud con javascript Fetch API devuelve "error de objeto"

Estoy tratando de aprender cómo solicitar datos JSON con JavaScript Fetch-API para obtener datos de un portal de datos abiertos llamado CKAN

Siguiendo la documentación de Google probé este código:

 fetch('https://ckan.open.nrw.de/api/3/action/package_list') .then( function(response) { if (response.status !== 200) { console.log('Looks like there was a problem. Status Code: ' + response.status); return; } // Examine the text in the response response.json().then(function(data) { console.log(data); }); } ) .catch(function(err) { console.log('Fetch Error :-S', err); });

Esta función detecta un error de objeto (al abrir la URL en mi navegador, obtengo un JSON válido):

 "Fetch Error :-S", [object Error] { ... }

¿Cuál es el problema aquí?

Aquí hay un jsfiddle que funciona

¡Gracias por tu ayuda!

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