Skip to content

Ashwini-12a-coder/Fetch-and-Display-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Fetch and Display Data from Public API

Objective

Use JavaScript Fetch API to get user data from JSONPlaceholder and display it.

Features

  • Fetch API to retrieve user data
  • Async/await for asynchronous handling
  • Error handling with try/catch
  • Reload button to refetch data
  • Styled user cards with CSS
  • Displays name, email, and address

How to Run

  1. Clone this repo
  2. Open index.html in Chrome browser
  3. See user data displayed
  4. Disable internet to test error handling
  5. Click "Reload Data" button to refetch

Tools Used

  • HTML
  • CSS
  • JavaScript (Fetch API)
  • JSONPlaceholder (public API)

Outcome

  • Learned Fetch API
  • Understood Promises & async/await
  • Practiced JSON parsing
  • Implemented error handling

About

Use JavaScript Fetch API to get user data from [JSONPlaceholder](https://jsonplaceholder.typicode.com/users) and display it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published