[b]"How to create a request in Node.js using axios?"[/b] or [b]"What's the best way to create a request with node

18 Replies, 541 Views

Try-catch is def the way to go, but don’t forget to check `error.response`! Sometimes the error is in the response body, and you’ll miss it if you only log `error.message`.

For node axios create request, I like to wrap it in a util function with custom logging. Makes debugging way easier.

Messages In This Thread



Users browsing this thread: 1 Guest(s)