Skip to content

Make an asynchronous request to a remote server via javascript using async/await and try/catch.

Notifications You must be signed in to change notification settings

DelphineLecorney/random-quote-using-async-await

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

random-quote-using-async-await

✨ random-quote-using-async-await ✨

Random Quotes

Link to Random Quotes

This is an exercise in Becode training.


Make an asynchronous request to a remote server via javascript using async/await and try/catch.

DOM manipulation : modify the DOM according to the result of the request.

Don't forget HTML semantics (blockquote..)

Steps

  • Send a request to a remote server via javascript using async/await and try/catch.
  • Treat the answer :
  • If the request failed, show an error message to the user.
  • if the request succeed, transform a JSON response into Html, injected in the DOM.
  • Make a button to generate another random quote.
  • Make it look good via CSS (inspiration).
  • Publish it as a GitHub Page

Bonus

Use the agify API to guess the age of the authors Implement loader wihle the request is pending

🔭 Project to be completed in 1 day (17 May 2023)

References

Try..catch Async API

keyframes(https://codepen.io/teerapuch/pen/vLJXeR)

loader(https://www.cssportal.com/css-loader-generator/)

👯 ** I like javascript and I discover JSON with fetch, API and DOM !** 👯

Connect with me:

gfdghshg

Delphine Lecorney

Languages and Tools:

html5 javascript linux

About

Make an asynchronous request to a remote server via javascript using async/await and try/catch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published