Lightweight Node.js HTTP Client
JSON →btch-http is a lightweight and type-safe HTTP client for Node.js, built directly on the Node.js `https` module, ensuring zero external dependencies. The current stable version is 2.0.3, with recent minor updates following a major version 2.0.0 release. It differentiates itself by offering full TypeScript support out-of-the-box, smart error handling that consolidates network, timeout, and HTTP status code (>=300) errors into a custom `HttpError` class, and comprehensive timeout support. It provides both a quick one-liner `HttpGet` function for simple GET requests with URL encoding and a full-featured `HttpClient` class for more complex interactions involving configurable base URLs, versions, default headers, and POST requests with JSON bodies or custom headers. It requires Node.js >=20.18.1.
Traffic · last 30 days ↓67% vs prev 7d
top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇵🇱 Poland