1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-29 12:18:23 +01:00

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>
This commit is contained in:
Kevin 2024-07-31 22:12:21 +02:00 committed by GitHub
parent b540d1eac1
commit 0a7ab9787c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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/)