Capture HTTP Response Content
JSON →on-http-end is a lightweight Node.js utility designed to intercept and capture the full HTTP response payload, including headers, status code, and the final data, just before the response stream concludes. Inspired by `apicache`, it offers a simple, callback-based API to register a function that executes when `res.end()` is called. This allows developers to inspect or process the complete response content and metadata, making it suitable for logging, debugging, or custom caching mechanisms. The current stable version is 1.0.3, which includes a fix for proper scope handling, allowing multiple `onEnd` registrations on a single response object. Its release cadence appears infrequent, reflecting its focused scope and stable API. A key differentiator is its direct, low-level integration with Node.js's native `http.ServerResponse` object, providing granular control without the overhead of a full middleware framework.
Traffic · last 30 days ↓50% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇬🇧 United Kingdom · 🇩🇪 Germany