Add content for fetch (#6309)

* Update fetch@B_3rTGQxJneMREXoi2gQn.md

Added content to empty roadmap node, describing the functionality of fetch as a stable native API in Node.js as of Node v21 with examples and additional resources for further reading.

* Update src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md

---------

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/6312/head
Kevin 4 months ago committed by GitHub
parent b540d1eac1
commit 0a7ab9787c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md

@ -1 +1,10 @@
# fetch # fetch
The `fetch()` method in JavaScript is used to request to the server and load the information on the webpages. The request can be of any APIs that return the data of the format JSON or XML. This method returns a promise.
Visit the following resources to learn more:
- [@official@MDN - Using the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
- [@official@NodeJS globals: fetch](https://nodejs.org/api/globals.html#fetch)
- [@official@MDN - Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
- [@article@freeCodeCamp on avoiding callback hell](https://www.freecodecamp.org/news/how-to-deal-with-nested-callbacks-and-avoid-callback-hell-1bc8dc4a2012/)

Loading…
Cancel
Save