HAR Logging for Node.js Fetch

JSON →
library 1.0.1 ·javascript
verified May 27, 2026

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.

total hits 16
actors 8 distinct systems
last hit 1d ago human
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany