From 0a7ab9787c5590f7c04c9ca60e0661225f0c8907 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 31 Jul 2024 22:12:21 +0200 Subject: [PATCH] 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 --- .../nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md b/src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md index 7aa0a6f2e..a7c4556c3 100644 --- a/src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md +++ b/src/data/roadmaps/nodejs/content/fetch@B_3rTGQxJneMREXoi2gQn.md @@ -1 +1,10 @@ -# fetch \ No newline at end of file +# 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/)