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

222
Vistas
cannot fetch data from jsonplaceholder.typicode.com

I am having trouble getting the data from jsonplaceholder.com

I tried using promise:

fetch('https://jsonplaceholder.typicode.com/users')
  .then(resp => resp.json())
  .then(console.log)

using promise

Then I tried the same thing using async function:

async function fetchUsers() {
  const resp = await fetch('https://jsonplaceholder.typicode.com/users')
  const data = await resp.json()
  console.log(data)
}

fetchUsers()

using async function

Either way, I get an error.

I am studying a course where the tutor had no problem fetching the function using both async and promise:

screenshot from the course lecture

Please help

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

@HacKaTun3s's comment worked for me: "You cant fetch from a new tab page. Navigate to google.com and try the same thing again."

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