Skip to content

A website which suggests upon meals and recipes based on your ingredients using fetch API.

License

Notifications You must be signed in to change notification settings

praball/API-Recipe-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The-Fetch-API

Learning about fetch API
This project is to explore the fetch API. In this project, fetching the data from local text file, local json file and external API are demonstrated.

For demonstrating fetching data from external API, https://api.github.com/users API is used.


  • Fetch API is a newer standard for dealing with HTTP requests
  • The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
  • It is now a part of window object
  • Fetch returns promises.
  • When you get a response from a promise, you have to use .then()
  • If there is some kind of error, then we can do .catch()

Update to the project

  • In app.js, arrow functions are used.
  • Arrow functions use lexical this. So you don't have to worry about the scope of the function

About

A website which suggests upon meals and recipes based on your ingredients using fetch API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published