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

18 Replies, 810 Views

For node axios create request, I always add a timeout. Nothing worse than a hanging request.

Also, pro tip: Use `validateStatus` in the config to customize which HTTP codes throw errors. Super handy for APIs that return 404s as part of normal flow.

Messages In This Thread



Users browsing this thread: 1 Guest(s)