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

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

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 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!