BIG new feature lands in Node.js // The Code Report
Key Takeaways
This video explains the new Fetch API feature in Node.js for making HTTP requests
Full Transcript
it is february 4th 2022 and you're watching the code report news you can use javascript developers are famous for their ability to reinvent the wheel in node.js for example there are many ways to work with the hypertax transfer protocol if you hate yourself you might use its built-in http module but there is a smorgasbord of third-party packages like axios node fetch got request super agent and hundreds of others they're extremely popular and account for tens of millions of weekly downloads just this week developers got some surprise news with a pull request adding support for the fetch api natively in node.js just a mere six years or so after it became an industry standard via what double eug stop trying to make fetch happen it's not going to happen fetch is not perfect but it has proven itself to be good enough to where we don't need to wrap it with a billion other packages just to avoid mental health issues but why is this a big deal well fetch provides a generic definition of request and response objects and allows you to manage them with a simple promise-based api because fetch and node is pretty much identical to the browser developers have less mental overhead when translating between front-end and back-end code sharing common apis also makes it much easier to develop packages that work both in node and the browser it's something that other runtimes like dino and cloudflare workers have already implemented so they deserve some credit for giving node some friendly competition fetch sounds cool so how do i use it as of today it's not in a public release but you could build node from source if you're really motivated keep your eyes peeled for node version 17.5 where it should be available under an experimental flag then expect it to be a standard issue weapon by note 18. the implementation is based on a package you can use today called undici which is named after the character 11 and stranger things we can install it in a node project then import fetch it makes scripting a node really nice because to make a git request all we have to do is await fetch to access data from any website or api and we don't even need an async function because node also supports top level await now to make a post request we can use the same function and modify some of its options like the method body and headers that's pretty nice but one question on a lot of people's minds is what does this mean for axios in my opinion i think there will still be a place for third party libraries but the vast majority of projects will be able to get by with what's built into node instead of reaching to install a third-party package for every project speaking of things that are dead in other news i'm sad to report that our twitter bot bob has been terminated it's my fault because i didn't realize that building twitter bots with open ai is not allowed i feel terrible about this but i really don't want to lose my api key because i have a lot of other cool ideas for open ai bob had a short but impactful life and apparently he meant a lot of different things to a lot of different people his final words before i pulled the plug were i'll be back i don't want to end this video on a sad note so in other more uplifting news facebook or meta was down 25 yesterday and zuckerberg's net worth declined by about 30 billion dollars this has been the code report thanks for watching and i will see you in the next one
Original Description
The Fetch API has officially made its way into Node.js giving web developers a better default tool for making HTTP requests. Learn why this feature is a big deal and with it means for NPM packages like Axios.
#firstlook #nodejs #TheCodeReport
🔗 Resources
Node Announcement https://twitter.com/targos89/status/1488471755194867715
Undici Node Fetch https://github.com/nodejs/undici
Fetch Standard https://fetch.spec.whatwg.org/
🔥 Get More Content - Upgrade to PRO
Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🔖 Topics Covered
- What is the fetch API?
- Why is node fetch a big deal?
- The future of Node.js
- New JavaScript features
- Node fetch vs Axios
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fireship · Fireship · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Angular 4 Development and Production Environments with Firebase
Fireship
OAuth with Angular and Firebase Tutorial
Fireship
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
Angular Router Guards for Firebase Users
Fireship
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
Upload Files from Angular to Firebase Storage
Fireship
How to Deploy an Angular App to Firebase Hosting
Fireship
Sharing Data between Components in Angular
Fireship
Loading Spinners for Asynchronous Firebase Data
Fireship
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
Firebase Database Rules Tutorial
Fireship
Autocomplete Search with Angular4 and Firebase
Fireship
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
Custom Usernames with Firebase Authentication
Fireship
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
Simple Pagination with Firebase and Angular 4
Fireship
How to Connect Firebase Users to their Data - 3 Methods
Fireship
Add Toast Message Notifications to your Angular App
Fireship
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
Learn NgModule in Angular with Examples
Fireship
Lazy Loading Components in Angular 4
Fireship
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
Angular 4 Full Text Search with Algolia - Part 1
Fireship
Algolia with Firebase Cloud Functions - Part 2
Fireship
Firebase Phone Authentication in Angular 4
Fireship
Top 7 RxJS Concepts for Angular Developers
Fireship
Learn Angular Animations with 5 Examples
Fireship
Advanced Firebase Data Filtering (Multi-Property)
Fireship
Realtime Maps with Mapbox + Firebase + Angular
Fireship
Angular Reactive Forms with Firebase Database Backend
Fireship
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
Top 7 Ways to Debug Angular 4 Apps
Fireship
Infinite Scroll with Angular and Firebase
Fireship
Use TypeScript with Firebase Cloud Functions
Fireship
Realtime Graphs and Charts with Plotly and Firebase
Fireship
Role-Based User Permissions in Firebase
Fireship
User Presence System in Realtime - Online, Offline, Away
Fireship
Location-based Queries with GeoFire and Angular Google Maps
Fireship
Angular ngrx Redux Quick Start Tutorial
Fireship
Angular Ngrx Effects with Firebase Database
Fireship
Progressive Web Apps with Angular
Fireship
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
RxJS Quick Start with Practical Examples
Fireship
Send SMS Text Messages with Twilio and Firebase
Fireship
Firebase Database Performance Profiling
Fireship
Native Desktop Apps with Angular and Electron
Fireship
Subscription Payments with Stripe, Angular, and Firebase
Fireship
Firestore with AngularFire5 Quick Start Tutorial
Fireship
Angular HTTP Client Quick Start Tutorial
Fireship
Google Sign-In with Firestore Custom User Data
Fireship
Star Review System from Scratch with Firestore + Angular
Fireship
Angular Chatbot with Dialogflow (API.ai)
Fireship
Learn @ngrx/entity and Feature Modules
Fireship
Infinite Scroll Pagination with Firestore
Fireship
Faster Firestore via Data Aggregation
Fireship
Contentful - CMS for Angular Progressive Web Apps
Fireship
Related Reads
📰
📰
📰
📰
Stop Calling Node.js “Single-Threaded”: A Look Under the Hood
Medium · JavaScript
Best hosts file managers in 2026: SwitchHosts, Gas Mask, and the rest
Dev.to · Locahl
TypeScript `noUncheckedIndexedAccess` in 2026: The Flag You Should Have Turned On Years Ago
Dev.to · jsmanifest
How the Brazilian CPF Validation Algorithm Works in JavaScript (Step-by-Step)
Dev.to · Mehru
🎓
Tutor Explanation
DeepCamp AI