Node has a built-in HTTP library that lets you make HTTP requests with no outside modules. The only downside is that the API is somewhat hard to use.
Without question, developers prefer following libraries over built-in APIs for its ease of use, promise based syntax, request and response interception, declarative APIs, automatic JSON data transformation, progress, streamlined error handling, and the ability to cancel requests.
- Axios - Promise based HTTP client for the browser and node.js, allow you to intercept request and response, transform request and response data, cancel requests, and automatic transforms for JSON data.
- Got - Human-friendly and powerful HTTP request library for Node.js, very lightweight, works with Promise and Stream.
- Superagent - Small progressive client-side HTTP request library, and Node.js module with the same API, supporting many high-level HTTP client features.
- Node Fetch - Light-weight module that brings Fetch API to Node, consistent with
window.fetch API, use native promise and async functions.
- Request - Designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. As of Feb 11th 2020, request is fully deprecated.