HTTP/HTTPS Agent Resolver
JSON →`http-https-agent` is a small, focused utility package designed to simplify the selection of appropriate Node.js HTTP or HTTPS agents based on a given URL's protocol. It provides a single factory function that, when invoked with agent options (like `keepAlive`), returns another function capable of dynamically providing either an `http.Agent` or `https.Agent` instance. The package is currently at version 1.0.2. Due to its minimal scope and lack of recent updates (last published several years ago), it appears to be in a maintenance-only state. Its primary differentiator is consolidating agent management for dual-protocol scenarios, avoiding manual `if/else` checks for agent instantiation. It internally relies on `lodash.startswith` for protocol detection.
Traffic · last 30 days ↑50% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇪🇸 Spain · 🇨🇦 Canada · 🇫🇷 France