HAR Logging for Node.js Fetch
JSON →node-fetch-har is a Node.js library that provides a wrapper around the popular `node-fetch` package, enabling the automatic generation of HTTP Archive (HAR) logs for server-side HTTP requests. This functionality is crucial for debugging, performance analysis, and capturing detailed network activity on the backend, analogous to a browser's network tab. Currently at version 1.0.1, the library maintains a stable release cycle, having solidified its API after a series of release candidates for its 1.0.0 major version. A key differentiator is its seamless integration with existing `node-fetch` usage, offering options to attach HAR entries directly to response objects, use an `onHarEntry` callback, or collect multiple entries into a single HAR log via `createHarLog`. It supports custom `node-fetch` agents, tracks various request timings (DNS, connect, SSL, send), and handles redirects and request body data, making it a comprehensive tool for server-side request introspection. Unlike browser-based HAR generation, this library is strictly for server environments due to its reliance on Node.js built-in modules and the sensitive nature of data it can capture.
Traffic · last 30 days ↑25% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany