Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJoshua Graber
11,785 PointsCan we use the fetch API with Node.js?
It seems that this course was created before the fetch() method was introduced into JavaScript. Does anyone know if more recent versions of Node.js include support for fetch? I value learning about the more complicated GET method, because it helps me to understand what's happening under the hood of fetch when I use it, but I'm just curious about whether or not it works within Node as well.
1 Answer
Sascha Bratton
3,671 PointsNot natively.
Node.js provides HTTP interfaces, but not Fetch API.
There are libraries available, including node-fetch
and isomorphic-fetch
.