"Struggling with how to send data to api in javascript node – help?"
Hey folks! 👋
I’ve been trying to figure out how to send data to api in javascript node, but I keep running into issues. Like, should I use `fetch`, `axios`, or the built-in `http` module?
Also, what’s the best way to handle errors? My code keeps breaking when the API returns a 404, and I’m low-key losing my mind. 😅
Any tips or examples would be *super* helpful. Maybe even a quick snippet of how you’d do it?
Thanks in advance! 🙏
(PS: If there’s a better lib than what I’m using, lmk!)
Hey folks! 👋
I’ve been trying to figure out how to send data to api in javascript node, but I keep running into issues. Like, should I use `fetch`, `axios`, or the built-in `http` module?
Also, what’s the best way to handle errors? My code keeps breaking when the API returns a 404, and I’m low-key losing my mind. 😅
Any tips or examples would be *super* helpful. Maybe even a quick snippet of how you’d do it?
Thanks in advance! 🙏
(PS: If there’s a better lib than what I’m using, lmk!)
