Wait, really? I thought fetch in nodejs was a thing now! Guess not.
I’ve been using axios forever—it’s way more reliable for API calls in nodejs IMO. The syntax is clean, and it handles errors better.
Try:
`npm install axios`
Then:
`const axios = require('axios');`
Bonus: it works in browsers too, so you can reuse code.
I’ve been using axios forever—it’s way more reliable for API calls in nodejs IMO. The syntax is clean, and it handles errors better.
Try:
`npm install axios`
Then:
`const axios = require('axios');`
Bonus: it works in browsers too, so you can reuse code.
